From 5adc20d42f67b9bc4541ef4be7de1e24b6e94741 Mon Sep 17 00:00:00 2001 From: Awilum Date: Fri, 31 May 2019 17:13:39 +0300 Subject: [PATCH] Flextype Box Plugin: Admin #125 #117 - Navigation links added --- site/plugins/admin/admin.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/site/plugins/admin/admin.php b/site/plugins/admin/admin.php index 3b17f0ac..accdd6ad 100755 --- a/site/plugins/admin/admin.php +++ b/site/plugins/admin/admin.php @@ -16,6 +16,7 @@ namespace Flextype; use Flextype\Component\Registry\Registry; use Flextype\Component\I18n\I18n; use Flextype\Component\Arr\Arr; +use function Flextype\Component\I18n\__; $uri = explode('/', \Slim\Http\Uri::createFromEnvironment(new \Slim\Http\Environment($_SERVER))->getPath()); @@ -32,6 +33,14 @@ if (isset($uri) && isset($uri[0]) && $uri[0] == 'admin') { // Set Default Admin locale I18n::$locale = $flextype->registry->get('settings.locale'); + $flextype->registry->set('admin_navigation.content.entries', ['title' => '' . __('admin_entries'), 'link' => $flextype->router->urlFor('admin.entries.index'), 'attributes' => ['class' => 'nav-link']]); + $flextype->registry->set('admin_navigation.extends.fieldsets', ['title' => '' . __('admin_fieldsets'), 'link' => $flextype->router->urlFor('admin.fieldsets.index'), 'attributes' => ['class' => 'nav-link']]); + $flextype->registry->set('admin_navigation.extends.templates', ['title' => '' . __('admin_templates'), 'link' => $flextype->router->urlFor('admin.templates.index'), 'attributes' => ['class' => 'nav-link']]); + $flextype->registry->set('admin_navigation.extends.snippets', ['title' => '' . __('admin_snippets'), 'link' => $flextype->router->urlFor('admin.snippets.index'), 'attributes' => ['class' => 'nav-link']]); + $flextype->registry->set('admin_navigation.extends.plugins', ['title' => '' . __('admin_plugins'), 'link' => $flextype->router->urlFor('admin.plugins.index'), 'attributes' => ['class' => 'nav-link']]); + $flextype->registry->set('admin_navigation.settings.settings', ['title' => '' . __('admin_settings'), 'link' => $flextype->router->urlFor('admin.settings.index'), 'attributes' => ['class' => 'nav-link']]); + $flextype->registry->set('admin_navigation.settings.infomation', ['title' => '' . __('admin_information'), 'link' => $flextype->router->urlFor('admin.information.index'), 'attributes' => ['class' => 'nav-link']]); + $flextype['SettingsController'] = function($container) { return new SettingsController($container); }; @@ -59,4 +68,8 @@ if (isset($uri) && isset($uri[0]) && $uri[0] == 'admin') { $flextype['TemplatesController'] = function($container) { return new TemplatesController($container); }; + + $flextype['UsersController'] = function($container) { + return new UsersController($container); + }; }