2021-09-09 11:05:00 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Controller\Component;
|
|
|
|
|
|
|
|
use Cake\Controller\Component;
|
|
|
|
use Cake\Core\Configure;
|
|
|
|
use Cake\Utility\Inflector;
|
2021-09-09 13:12:52 +02:00
|
|
|
use Cake\Utility\Hash;
|
2021-09-09 11:05:00 +02:00
|
|
|
use Cake\Routing\Router;
|
2021-09-09 13:12:52 +02:00
|
|
|
use Cake\ORM\TableRegistry;
|
2021-09-09 11:05:00 +02:00
|
|
|
|
|
|
|
class NavigationComponent extends Component
|
|
|
|
{
|
|
|
|
private $user = null;
|
|
|
|
public $breadcrumb = null;
|
2021-09-10 15:58:41 +02:00
|
|
|
public $iconToTableMapping = [
|
|
|
|
'Individuals' => 'address-book',
|
|
|
|
'Organisations' => 'building',
|
|
|
|
'EncryptionKeys' => 'key',
|
|
|
|
'SharingGroups' => 'user-friends',
|
|
|
|
'Broods' => 'network-wired',
|
|
|
|
'Roles' => 'id-badge',
|
|
|
|
'Users' => 'users',
|
|
|
|
'Inbox' => 'inbox',
|
|
|
|
'Outbox' => 'inbox',
|
|
|
|
'MetaTemplates' => 'object-group',
|
|
|
|
'LocalTools' => 'tools',
|
|
|
|
'Instance' => 'server',
|
2021-09-17 18:30:32 +02:00
|
|
|
'Tags' => 'tags',
|
2021-09-10 15:58:41 +02:00
|
|
|
];
|
2021-09-09 11:05:00 +02:00
|
|
|
|
|
|
|
public function initialize(array $config): void
|
|
|
|
{
|
|
|
|
$this->request = $config['request'];
|
2021-09-10 11:55:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function beforeFilter($event)
|
|
|
|
{
|
2021-09-09 11:05:00 +02:00
|
|
|
$this->fullBreadcrumb = $this->genBreadcrumb();
|
|
|
|
$this->breadcrumb = $this->getBreadcrumb();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getSideMenu(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'ContactDB' => [
|
|
|
|
'Individuals' => [
|
|
|
|
'label' => __('Individuals'),
|
2021-09-10 16:05:05 +02:00
|
|
|
'icon' => $this->iconToTableMapping['Individuals'],
|
2021-09-09 11:05:00 +02:00
|
|
|
'url' => '/individuals/index',
|
|
|
|
],
|
|
|
|
'Organisations' => [
|
|
|
|
'label' => __('Organisations'),
|
2021-09-10 16:05:05 +02:00
|
|
|
'icon' => $this->iconToTableMapping['Organisations'],
|
2021-09-09 11:05:00 +02:00
|
|
|
'url' => '/organisations/index',
|
|
|
|
],
|
|
|
|
'EncryptionKeys' => [
|
|
|
|
'label' => __('Encryption keys'),
|
2021-09-10 16:05:05 +02:00
|
|
|
'icon' => $this->iconToTableMapping['EncryptionKeys'],
|
2021-09-09 11:05:00 +02:00
|
|
|
'url' => '/encryptionKeys/index',
|
|
|
|
]
|
|
|
|
],
|
|
|
|
'Trust Circles' => [
|
|
|
|
'SharingGroups' => [
|
|
|
|
'label' => __('Sharing Groups'),
|
2021-09-10 16:05:05 +02:00
|
|
|
'icon' => $this->iconToTableMapping['SharingGroups'],
|
2021-09-09 11:05:00 +02:00
|
|
|
'url' => '/sharingGroups/index',
|
|
|
|
]
|
|
|
|
],
|
|
|
|
'Sync' => [
|
|
|
|
'Broods' => [
|
|
|
|
'label' => __('Broods'),
|
2021-09-10 16:05:05 +02:00
|
|
|
'icon' => $this->iconToTableMapping['Broods'],
|
2021-09-09 11:05:00 +02:00
|
|
|
'url' => '/broods/index',
|
|
|
|
]
|
|
|
|
],
|
|
|
|
'Administration' => [
|
|
|
|
'Roles' => [
|
|
|
|
'label' => __('Roles'),
|
2021-09-10 16:05:05 +02:00
|
|
|
'icon' => $this->iconToTableMapping['Roles'],
|
2021-09-09 11:05:00 +02:00
|
|
|
'url' => '/roles/index',
|
|
|
|
],
|
|
|
|
'Users' => [
|
|
|
|
'label' => __('Users'),
|
2021-09-10 16:05:05 +02:00
|
|
|
'icon' => $this->iconToTableMapping['Users'],
|
2021-09-09 11:05:00 +02:00
|
|
|
'url' => '/users/index',
|
|
|
|
],
|
|
|
|
'Messages' => [
|
|
|
|
'label' => __('Messages'),
|
2021-09-10 16:05:05 +02:00
|
|
|
'icon' => $this->iconToTableMapping['Inbox'],
|
2021-09-09 11:05:00 +02:00
|
|
|
'url' => '/inbox/index',
|
|
|
|
'children' => [
|
|
|
|
'index' => [
|
|
|
|
'url' => '/inbox/index',
|
|
|
|
'label' => __('Inbox')
|
|
|
|
],
|
|
|
|
'outbox' => [
|
|
|
|
'url' => '/outbox/index',
|
|
|
|
'label' => __('Outbox')
|
|
|
|
],
|
|
|
|
]
|
|
|
|
],
|
|
|
|
'Add-ons' => [
|
|
|
|
'label' => __('Add-ons'),
|
|
|
|
'icon' => 'puzzle-piece',
|
|
|
|
'children' => [
|
|
|
|
'MetaTemplates.index' => [
|
|
|
|
'label' => __('Meta Field Templates'),
|
2021-09-10 16:05:05 +02:00
|
|
|
'icon' => $this->iconToTableMapping['MetaTemplates'],
|
2021-09-09 11:05:00 +02:00
|
|
|
'url' => '/metaTemplates/index',
|
|
|
|
],
|
|
|
|
'LocalTools.index' => [
|
|
|
|
'label' => __('Local Tools'),
|
2021-09-10 16:05:05 +02:00
|
|
|
'icon' => $this->iconToTableMapping['LocalTools'],
|
2021-09-09 11:05:00 +02:00
|
|
|
'url' => '/localTools/index',
|
2021-09-17 18:30:32 +02:00
|
|
|
],
|
|
|
|
'Tags.index' => [
|
|
|
|
'label' => __('Tags'),
|
|
|
|
'icon' => $this->iconToTableMapping['Tags'],
|
|
|
|
'url' => '/tags/index',
|
|
|
|
],
|
2021-09-09 11:05:00 +02:00
|
|
|
]
|
|
|
|
],
|
2021-09-18 10:31:05 +02:00
|
|
|
'Instance' => [
|
2021-09-09 11:05:00 +02:00
|
|
|
'label' => __('Instance'),
|
2021-09-18 10:31:05 +02:00
|
|
|
'icon' => $this->iconToTableMapping['Instance'],
|
2021-09-09 11:05:00 +02:00
|
|
|
'children' => [
|
2021-09-18 10:31:05 +02:00
|
|
|
'Settings' => [
|
|
|
|
'label' => __('Settings'),
|
|
|
|
'url' => '/instance/settings',
|
|
|
|
'icon' => 'cogs',
|
|
|
|
],
|
2021-09-09 11:05:00 +02:00
|
|
|
'Database' => [
|
|
|
|
'label' => __('Database'),
|
|
|
|
'url' => '/instance/migrationIndex',
|
|
|
|
'icon' => 'database',
|
2021-09-18 10:31:05 +02:00
|
|
|
],
|
2021-09-09 11:05:00 +02:00
|
|
|
]
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'Open' => [
|
|
|
|
'Organisations' => [
|
|
|
|
'label' => __('Organisations'),
|
2021-09-10 16:05:05 +02:00
|
|
|
'icon' => $this->iconToTableMapping['Organisations'],
|
2021-09-09 11:05:00 +02:00
|
|
|
'url' => '/open/organisations/index',
|
|
|
|
'children' => [
|
|
|
|
'index' => [
|
|
|
|
'url' => '/open/organisations/index',
|
|
|
|
'label' => __('List organisations')
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'open' => in_array('organisations', Configure::read('Cerebrate.open'))
|
|
|
|
],
|
|
|
|
'Individuals' => [
|
|
|
|
'label' => __('Individuals'),
|
2021-09-10 16:05:05 +02:00
|
|
|
'icon' => $this->iconToTableMapping['Individuals'],
|
2021-09-09 11:05:00 +02:00
|
|
|
'url' => '/open/individuals/index',
|
|
|
|
'children' => [
|
|
|
|
'index' => [
|
|
|
|
'url' => '/open/individuals/index',
|
|
|
|
'label' => __('List individuals')
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'open' => in_array('individuals', Configure::read('Cerebrate.open'))
|
|
|
|
]
|
|
|
|
]
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getBreadcrumb(): array
|
|
|
|
{
|
2021-09-09 13:12:52 +02:00
|
|
|
$controller = $this->request->getParam('controller');
|
|
|
|
$action = $this->request->getParam('action');
|
2021-09-09 11:05:00 +02:00
|
|
|
if (empty($this->fullBreadcrumb[$controller]['routes']["{$controller}:{$action}"])) {
|
2021-09-09 13:12:52 +02:00
|
|
|
return [[
|
|
|
|
'label' => $controller,
|
|
|
|
'url' => Router::url(['controller' => $controller, 'action' => $action]),
|
|
|
|
]]; // no breadcrumb defined for this endpoint
|
2021-09-09 11:05:00 +02:00
|
|
|
}
|
|
|
|
$currentRoute = $this->fullBreadcrumb[$controller]['routes']["{$controller}:{$action}"];
|
|
|
|
$breadcrumbPath = $this->getBreadcrumbPath("{$controller}:{$action}", $currentRoute);
|
|
|
|
return $breadcrumbPath['objects'];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getBreadcrumbPath(string $startRoute, array $currentRoute): array
|
|
|
|
{
|
|
|
|
$route = $startRoute;
|
|
|
|
$path = [
|
|
|
|
'routes' => [],
|
|
|
|
'objects' => [],
|
|
|
|
];
|
|
|
|
$visited = [];
|
|
|
|
while (empty($visited[$route])) {
|
|
|
|
$visited[$route] = true;
|
|
|
|
$path['routes'][] = $route;
|
|
|
|
$path['objects'][] = $currentRoute;
|
|
|
|
if (!empty($currentRoute['after'])) {
|
|
|
|
$route = $currentRoute['after'];
|
|
|
|
$split = explode(':', $currentRoute['after']);
|
|
|
|
$currentRoute = $this->fullBreadcrumb[$split[0]]['routes'][$currentRoute['after']];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$path['routes'] = array_reverse($path['routes']);
|
|
|
|
$path['objects'] = array_reverse($path['objects']);
|
|
|
|
return $path;
|
|
|
|
}
|
|
|
|
|
|
|
|
private function insertInheritance(array $config, array $fullConfig): array
|
|
|
|
{
|
|
|
|
if (!empty($config['routes'])) {
|
|
|
|
foreach ($config['routes'] as $routeName => $value) {
|
|
|
|
$config['routes'][$routeName]['route_path'] = $routeName;
|
|
|
|
if (!empty($value['inherit'])) {
|
|
|
|
$default = $config['defaults'][$value['inherit']] ?? [];
|
|
|
|
$config['routes'][$routeName] = array_merge($config['routes'][$routeName], $default);
|
|
|
|
unset($config['routes'][$routeName]['inherit']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $config;
|
|
|
|
}
|
|
|
|
|
|
|
|
private function insertRelated(array $config, array $fullConfig): array
|
|
|
|
{
|
|
|
|
if (!empty($config['routes'])) {
|
|
|
|
foreach ($config['routes'] as $routeName => $value) {
|
|
|
|
if (!empty($value['links'])) {
|
|
|
|
foreach ($value['links'] as $i => $linkedRoute) {
|
|
|
|
$split = explode(':', $linkedRoute);
|
|
|
|
if (!empty($fullConfig[$split[0]]['routes'][$linkedRoute])) {
|
|
|
|
$linkedRouteObject = $fullConfig[$split[0]]['routes'][$linkedRoute];
|
|
|
|
if (!empty($linkedRouteObject)) {
|
|
|
|
$config['routes'][$routeName]['links'][$i] = $linkedRouteObject;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
unset($config['routes'][$routeName]['links'][$i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!empty($value['actions'])) {
|
|
|
|
foreach ($value['actions'] as $i => $linkedRoute) {
|
|
|
|
$split = explode(':', $linkedRoute);
|
|
|
|
if (!empty($fullConfig[$split[0]]['routes'][$linkedRoute])) {
|
|
|
|
$linkedRouteObject = $fullConfig[$split[0]]['routes'][$linkedRoute];
|
|
|
|
if (!empty($linkedRouteObject)) {
|
|
|
|
$config['routes'][$routeName]['actions'][$i] = $linkedRouteObject;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
unset($config['routes'][$routeName]['actions'][$i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $config;
|
|
|
|
}
|
|
|
|
|
2021-09-09 13:12:52 +02:00
|
|
|
public function getDefaultCRUDConfig(string $controller, array $overrides=[], array $merges=[]): array
|
|
|
|
{
|
|
|
|
$table = TableRegistry::getTableLocator()->get($controller);
|
|
|
|
$default = [
|
|
|
|
'defaults' => [
|
|
|
|
'depth-1' => [
|
|
|
|
'after' => "{$controller}:index",
|
|
|
|
'textGetter' => !empty($table->getDisplayField()) ? $table->getDisplayField() : 'id',
|
|
|
|
'links' => [
|
|
|
|
"{$controller}:view",
|
|
|
|
"{$controller}:edit",
|
|
|
|
],
|
|
|
|
'actions' => [
|
|
|
|
"{$controller}:delete",
|
|
|
|
],
|
|
|
|
]
|
|
|
|
],
|
|
|
|
'routes' => [
|
|
|
|
"{$controller}:index" => [
|
|
|
|
'label' => Inflector::humanize($controller),
|
|
|
|
'url' => "/{$controller}/index",
|
2021-09-10 15:58:41 +02:00
|
|
|
'icon' => $this->iconToTableMapping[$controller]
|
2021-09-09 13:12:52 +02:00
|
|
|
],
|
|
|
|
"{$controller}:view" => [
|
|
|
|
'label' => __('View'),
|
2021-09-17 15:44:52 +02:00
|
|
|
'icon' => 'eye',
|
2021-09-09 13:12:52 +02:00
|
|
|
'inherit' => 'depth-1',
|
|
|
|
'url' => "/{$controller}/view/{{id}}",
|
|
|
|
'url_vars' => ['id' => 'id'],
|
|
|
|
],
|
|
|
|
"{$controller}:edit" => [
|
|
|
|
'label' => __('Edit'),
|
2021-09-17 15:44:52 +02:00
|
|
|
'icon' => 'edit',
|
2021-09-09 13:12:52 +02:00
|
|
|
'inherit' => 'depth-1',
|
|
|
|
'url' => "/{$controller}/edit/{{id}}",
|
|
|
|
'url_vars' => ['id' => 'id'],
|
|
|
|
],
|
|
|
|
"{$controller}:delete" => [
|
|
|
|
'label' => __('Delete'),
|
2021-09-17 15:44:52 +02:00
|
|
|
'icon' => 'trash',
|
2021-09-09 13:12:52 +02:00
|
|
|
'inherit' => 'depth-1',
|
|
|
|
'url' => "/{$controller}/delete/{{id}}",
|
|
|
|
'url_vars' => ['id' => 'id'],
|
|
|
|
],
|
|
|
|
]
|
|
|
|
];
|
|
|
|
$merged = array_merge_recursive($default, $merges);
|
|
|
|
$overridden = array_replace_recursive($merged, $overrides);
|
|
|
|
return $overridden;
|
|
|
|
}
|
|
|
|
|
2021-09-09 11:05:00 +02:00
|
|
|
public function genBreadcrumb(): array
|
|
|
|
{
|
|
|
|
$fullConfig = [
|
2021-09-09 13:12:52 +02:00
|
|
|
'Individuals' => $this->getDefaultCRUDConfig('Individuals'),
|
|
|
|
'Organisations' => $this->getDefaultCRUDConfig('Organisations'),
|
|
|
|
'EncryptionKeys' => $this->getDefaultCRUDConfig('EncryptionKeys'),
|
|
|
|
'SharingGroups' => $this->getDefaultCRUDConfig('SharingGroups'),
|
|
|
|
'Broods' => $this->getDefaultCRUDConfig('Broods', [], [
|
|
|
|
'defaults' => ['depth-1' => ['links' => 'LocalTools:brood_tools']]
|
|
|
|
]),
|
|
|
|
'Roles' => $this->getDefaultCRUDConfig('Roles'),
|
2021-09-10 15:58:41 +02:00
|
|
|
'Users' => $this->getDefaultCRUDConfig('Users'),
|
2021-09-09 13:12:52 +02:00
|
|
|
'Inbox' => $this->getDefaultCRUDConfig('Inbox', [
|
|
|
|
'defaults' => ['depth-1' => [
|
|
|
|
'links' => ['Inbox:view', 'Inbox:process'],
|
|
|
|
'actions' => ['Inbox:process', 'Inbox:delete'],
|
|
|
|
]]
|
|
|
|
], [
|
2021-09-09 11:05:00 +02:00
|
|
|
'routes' => [
|
2021-09-09 13:12:52 +02:00
|
|
|
'Inbox:discard' => [
|
|
|
|
'label' => __('Discard request'),
|
|
|
|
'inherit' => 'depth-1',
|
|
|
|
'url' => '/inbox/discard/{{id}}',
|
|
|
|
'url_vars' => ['id' => 'id'],
|
2021-09-09 11:05:00 +02:00
|
|
|
],
|
2021-09-09 13:12:52 +02:00
|
|
|
'Inbox:process' => [
|
|
|
|
'label' => __('Process request'),
|
2021-09-09 11:05:00 +02:00
|
|
|
'inherit' => 'depth-1',
|
2021-09-09 13:12:52 +02:00
|
|
|
'url' => '/inbox/process/{{id}}',
|
2021-09-09 11:05:00 +02:00
|
|
|
'url_vars' => ['id' => 'id'],
|
|
|
|
],
|
2021-09-09 13:12:52 +02:00
|
|
|
]
|
|
|
|
]),
|
|
|
|
'Outbox' => $this->getDefaultCRUDConfig('Outbox', [
|
|
|
|
'defaults' => ['depth-1' => [
|
|
|
|
'links' => ['Outbox:view', 'Outbox:process'],
|
|
|
|
'actions' => ['Outbox:process', 'Outbox:delete'],
|
|
|
|
]]
|
|
|
|
], [
|
|
|
|
'routes' => [
|
|
|
|
'Outbox:discard' => [
|
|
|
|
'label' => __('Discard request'),
|
2021-09-09 11:05:00 +02:00
|
|
|
'inherit' => 'depth-1',
|
2021-09-09 13:12:52 +02:00
|
|
|
'url' => '/outbox/discard/{{id}}',
|
2021-09-09 11:05:00 +02:00
|
|
|
'url_vars' => ['id' => 'id'],
|
|
|
|
],
|
2021-09-09 13:12:52 +02:00
|
|
|
'Outbox:process' => [
|
|
|
|
'label' => __('Process request'),
|
2021-09-09 11:05:00 +02:00
|
|
|
'inherit' => 'depth-1',
|
2021-09-09 13:12:52 +02:00
|
|
|
'url' => '/outbox/process/{{id}}',
|
2021-09-09 11:05:00 +02:00
|
|
|
'url_vars' => ['id' => 'id'],
|
|
|
|
],
|
|
|
|
]
|
2021-09-09 13:12:52 +02:00
|
|
|
]),
|
|
|
|
'MetaTemplates' => $this->getDefaultCRUDConfig('MetaTemplates', [
|
|
|
|
'defaults' => ['depth-1' => [
|
|
|
|
'links' => ['MetaTemplates:view', ''], // '' to remove leftovers. Related to https://www.php.net/manual/en/function.array-replace-recursive.php#124705
|
|
|
|
'actions' => ['MetaTemplates:toggle'],
|
|
|
|
]]
|
|
|
|
], [
|
2021-09-09 11:05:00 +02:00
|
|
|
'routes' => [
|
2021-09-09 13:12:52 +02:00
|
|
|
'MetaTemplates:toggle' => [
|
|
|
|
'label' => __('Toggle Meta-template'),
|
|
|
|
'inherit' => 'depth-1',
|
|
|
|
'url' => '/MetaTemplates/toggle/{{id}}',
|
|
|
|
'url_vars' => ['id' => 'id'],
|
|
|
|
],
|
|
|
|
]
|
|
|
|
]),
|
2021-09-17 18:30:32 +02:00
|
|
|
'Tags' => $this->getDefaultCRUDConfig('Tags', [
|
2021-10-01 15:13:18 +02:00
|
|
|
'defaults' => ['depth-1' => ['textGetter' => 'name']]
|
2021-09-17 18:30:32 +02:00
|
|
|
]),
|
2021-09-09 13:12:52 +02:00
|
|
|
'LocalTools' => [
|
|
|
|
'routes' => [
|
|
|
|
'LocalTools:index' => [
|
|
|
|
'label' => __('Local Tools'),
|
|
|
|
'url' => '/localTools/index',
|
2021-09-10 15:58:41 +02:00
|
|
|
'icon' => $this->iconToTableMapping['LocalTools'],
|
2021-09-09 13:12:52 +02:00
|
|
|
],
|
|
|
|
'LocalTools:viewConnector' => [
|
|
|
|
'label' => __('View'),
|
|
|
|
'textGetter' => 'name',
|
|
|
|
'url' => '/localTools/viewConnector/{{connector}}',
|
|
|
|
'url_vars' => ['connector' => 'connector'],
|
|
|
|
'after' => 'LocalTools:index',
|
|
|
|
],
|
|
|
|
'LocalTools:broodTools' => [
|
2021-09-09 11:05:00 +02:00
|
|
|
'label' => __('Brood Tools'),
|
|
|
|
'url' => '/localTools/broodTools/{{id}}',
|
|
|
|
'url_vars' => ['id' => 'id'],
|
2021-09-09 13:12:52 +02:00
|
|
|
],
|
|
|
|
]
|
|
|
|
],
|
|
|
|
'Instance' => [
|
|
|
|
'routes' => [
|
2021-09-17 13:07:44 +02:00
|
|
|
'Instance:home' => [
|
|
|
|
'label' => __('Home'),
|
|
|
|
'url' => '/',
|
|
|
|
'icon' => 'home'
|
|
|
|
],
|
2021-09-27 14:02:50 +02:00
|
|
|
'Instance:settings' => [
|
|
|
|
'label' => __('Settings'),
|
|
|
|
'url' => '/instance/settings',
|
|
|
|
'icon' => 'cogs'
|
|
|
|
],
|
2021-09-09 13:12:52 +02:00
|
|
|
'Instance:migrationIndex' => [
|
|
|
|
'label' => __('Database Migration'),
|
|
|
|
'url' => '/instance/migrationIndex',
|
2021-09-10 15:58:41 +02:00
|
|
|
'icon' => 'database'
|
2021-09-17 13:07:44 +02:00
|
|
|
],
|
2021-09-09 11:05:00 +02:00
|
|
|
]
|
|
|
|
]
|
|
|
|
];
|
|
|
|
foreach ($fullConfig as $controller => $config) {
|
|
|
|
$fullConfig[$controller] = $this->insertInheritance($config, $fullConfig);
|
|
|
|
}
|
|
|
|
foreach ($fullConfig as $controller => $config) {
|
|
|
|
$fullConfig[$controller] = $this->insertRelated($config, $fullConfig);
|
|
|
|
}
|
|
|
|
return $fullConfig;
|
|
|
|
}
|
|
|
|
}
|