mirror of
https://github.com/flextype/flextype.git
synced 2025-08-15 01:24:25 +02:00
Admin Panel - Slim Integration - next round of integration
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Flextype;
|
||||
|
||||
use Flextype\Component\Registry\Registry;
|
||||
|
||||
class NavigationManager
|
||||
{
|
||||
public static function addItem(string $area, string $item, string $title, string $link, array $attributes = []) : void
|
||||
{
|
||||
$flextype->registry->set("admin_navigation.{$area}.{$item}.area", $area);
|
||||
$flextype->registry->set("admin_navigation.{$area}.{$item}.item", $item);
|
||||
$flextype->registry->set("admin_navigation.{$area}.{$item}.title", $title);
|
||||
$flextype->registry->set("admin_navigation.{$area}.{$item}.link", $link);
|
||||
$flextype->registry->set("admin_navigation.{$area}.{$item}.attributes", $attributes);
|
||||
}
|
||||
|
||||
public static function getItems(string $area)
|
||||
{
|
||||
return Registry::get("admin_navigation.{$area}");
|
||||
}
|
||||
}
|
@@ -17,7 +17,8 @@ $app->get('/admin/plugins', function (Request $request, Response $response, arra
|
||||
return $this->view->render($response,
|
||||
'plugins/admin/views/templates/extends/plugins/index.html', [
|
||||
'registry' => $this->get('registry')->dump(),
|
||||
'plugins_list' => $this->get('registry')->get('plugins')
|
||||
'plugins_list' => $this->get('registry')->get('plugins'),
|
||||
'menu_item' => 'plugins'
|
||||
]);
|
||||
})->setName('plugins');
|
||||
|
||||
|
Reference in New Issue
Block a user