Changeset View
Changeset View
Standalone View
Standalone View
src/app/Http/Controllers/RelationController.php
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | protected static function objectState($resource): array | ||||
if (strpos($const, 'STATUS_') === 0 && $const != 'STATUS_NEW') { | if (strpos($const, 'STATUS_') === 0 && $const != 'STATUS_NEW') { | ||||
$method = Str::camel('is_' . strtolower(substr($const, 7))); | $method = Str::camel('is_' . strtolower(substr($const, 7))); | ||||
$state[$method] = $resource->{$method}(); | $state[$method] = $resource->{$method}(); | ||||
} | } | ||||
} | } | ||||
$with_ldap = \config('app.with_ldap'); | $with_ldap = \config('app.with_ldap'); | ||||
$state['isReady'] = (!isset($state['isImapReady']) || $state['isImapReady']) | $state['isReady'] = (!isset($state['isActive']) || $state['isActive']) | ||||
&& (!isset($state['isImapReady']) || $state['isImapReady']) | |||||
&& (!$with_ldap || !isset($state['isLdapReady']) || $state['isLdapReady']) | && (!$with_ldap || !isset($state['isLdapReady']) || $state['isLdapReady']) | ||||
&& (!isset($state['isVerified']) || $state['isVerified']) | && (!isset($state['isVerified']) || $state['isVerified']) | ||||
&& (!isset($state['isConfirmed']) || $state['isConfirmed']); | && (!isset($state['isConfirmed']) || $state['isConfirmed']); | ||||
if (!$with_ldap) { | if (!$with_ldap) { | ||||
unset($state['isLdapReady']); | unset($state['isLdapReady']); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 290 Lines • Show Last 20 Lines |