Changeset View
Changeset View
Standalone View
Standalone View
src/app/Http/Controllers/RelationController.php
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | class RelationController extends ResourceController | ||||
* @param object $object The object to process | * @param object $object The object to process | ||||
* @param array $steps The steps definition | * @param array $steps The steps definition | ||||
* | * | ||||
* @return array Process state information | * @return array Process state information | ||||
*/ | */ | ||||
protected static function processStateInfo($object, array $steps): array | protected static function processStateInfo($object, array $steps): array | ||||
{ | { | ||||
$process = []; | $process = []; | ||||
$withLdap = \config('app.with_ldap'); | |||||
// Create a process check list | // Create a process check list | ||||
foreach ($steps as $step_name => $state) { | foreach ($steps as $step_name => $state) { | ||||
// Remove LDAP related steps if the backend is disabled | |||||
if (!$withLdap && strpos($step_name, '-ldap-')) { | |||||
continue; | |||||
} | |||||
$step = [ | $step = [ | ||||
'label' => $step_name, | 'label' => $step_name, | ||||
'title' => \trans("app.process-{$step_name}"), | 'title' => \trans("app.process-{$step_name}"), | ||||
]; | ]; | ||||
if (is_array($state)) { | if (is_array($state)) { | ||||
$step['link'] = $state[1]; | $step['link'] = $state[1]; | ||||
$state = $state[0]; | $state = $state[0]; | ||||
▲ Show 20 Lines • Show All 228 Lines • Show Last 20 Lines |