diff --git a/composer.json b/composer.json index 3ab8c113d4769086caec0ad549f7ded3294d91cc..0596f082960717f51f5819080b32c5529d9e5abc 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,7 @@ "babdev/pagerfanta-bundle": "^2.4", "friendsofsymfony/ckeditor-bundle": "^2.2", "friendsofsymfony/jsrouting-bundle": "^2.6", + "knplabs/knp-menu-bundle": "^3.0", "knplabs/knp-time-bundle": "^1.13", "liip/imagine-bundle": "^2.3", "oneup/flysystem-bundle": "^3.5", diff --git a/composer.lock b/composer.lock index 54ea98fbb873506acfe7f8c037991fe6949ff6a8..1f4e37a265c381332895d2bbc51945f236a1da33 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "db3ecec787fb8d699e49373ac353879a", + "content-hash": "227f866a0b168a4a802134edfc5d1987", "packages": [ { "name": "api-platform/api-pack", @@ -2299,6 +2299,146 @@ ], "time": "2019-12-04T09:55:33+00:00" }, + { + "name": "knplabs/knp-menu", + "version": "v3.1.2", + "source": { + "type": "git", + "url": "https://github.com/KnpLabs/KnpMenu.git", + "reference": "9996764bc4bdc4381ecdc4617817de23948f0cdb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/KnpLabs/KnpMenu/zipball/9996764bc4bdc4381ecdc4617817de23948f0cdb", + "reference": "9996764bc4bdc4381ecdc4617817de23948f0cdb", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "conflict": { + "twig/twig": "<1.40 || >=2,<2.9" + }, + "require-dev": { + "phpspec/prophecy": "^1.8", + "psr/container": "^1.0", + "symfony/http-foundation": "^3.4 || ^4.2|| ^5.0", + "symfony/phpunit-bridge": "^3.3 || ^4.2|| ^5.0", + "symfony/routing": "^3.4 || ^4.2|| ^5.0", + "twig/twig": "^1.40 || ^2.9 || ^3.0" + }, + "suggest": { + "twig/twig": "for the TwigRenderer and the integration with your templates" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Knp\\Menu\\": "src/Knp/Menu" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KnpLabs", + "homepage": "https://knplabs.com" + }, + { + "name": "Christophe Coevoet", + "email": "stof@notk.org" + }, + { + "name": "The Community", + "homepage": "https://github.com/KnpLabs/KnpMenu/contributors" + } + ], + "description": "An object oriented menu library", + "homepage": "https://knplabs.com", + "keywords": [ + "menu", + "tree" + ], + "time": "2020-08-15T08:01:46+00:00" + }, + { + "name": "knplabs/knp-menu-bundle", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/KnpLabs/KnpMenuBundle.git", + "reference": "2795e236db1d807040762be9a2813ab8c6ed0569" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/KnpLabs/KnpMenuBundle/zipball/2795e236db1d807040762be9a2813ab8c6ed0569", + "reference": "2795e236db1d807040762be9a2813ab8c6ed0569", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "knplabs/knp-menu": "^3.0", + "php": "^7.2", + "symfony/framework-bundle": "^3.4 | ^4.2 | ^5.0" + }, + "require-dev": { + "phpspec/prophecy": "^1.8", + "symfony/expression-language": "^3.4 | ^4.2 | ^5.0", + "symfony/phpunit-bridge": "^3.4 | ^4.2 | ^5.0", + "symfony/templating": "^3.4 | ^4.0 | ^5.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Knp\\Bundle\\MenuBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Knplabs", + "homepage": "http://knplabs.com" + }, + { + "name": "Christophe Coevoet", + "email": "stof@notk.org" + }, + { + "name": "Symfony Community", + "homepage": "https://github.com/KnpLabs/KnpMenuBundle/contributors" + } + ], + "description": "This bundle provides an integration of the KnpMenu library", + "keywords": [ + "menu" + ], + "time": "2019-12-01T13:07:41+00:00" + }, { "name": "knplabs/knp-time-bundle", "version": "v1.13.0", diff --git a/config/bundles.php b/config/bundles.php index 25544eac256758664576609e804d5bb40945c02f..ba0bdb1ab81e5796dbfd6e286d175310654620e0 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -22,4 +22,5 @@ return [ FOS\JsRoutingBundle\FOSJsRoutingBundle::class => ['all' => true], BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true], Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true], + Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true], ]; diff --git a/config/packages/teebb_core.yaml b/config/packages/teebb_core.yaml index e4a3fa285fad62d256584d80165e87d767f8343b..4068092b8c6728cbe5f7180d595eb47c0f64d936 100644 --- a/config/packages/teebb_core.yaml +++ b/config/packages/teebb_core.yaml @@ -1,4 +1,84 @@ teebb_core: + #Dashboard 侧边栏菜单 + side_menu: + content: + content: + label: Content + icon: fa-file-alt + items: + - label: Add Content + route: teebb_content_create_index + #route_params: {typeAlias: content} + groups: [] + - label: Manage Content + route: teebb_content_index + groups: [] + groups: [] + type: + label: Type + icon: fa-boxes + items: + - label: Add Type + route: content_create + groups: [] + - label: Manage Type + route: content_index + groups: [] + groups: [] + taxonomy: + label: Taxonomy + icon: fa-tags + items: + - label: Add Taxonomy + route: taxonomy_create + groups: [] + - label: Manage Taxonomy + route: taxonomy_index + groups: [] + groups: [] + other: + menu: + label: Menu + icon: fa-list + items: + - label: Add Menu + route: taxonomy_create + groups: [] + - label: Manage Menu + route: taxonomy_index + groups: [] + groups: [] + comment: + label: Comment + icon: fa-comment + items: + - label: Manage Comment + route: comment_index + groups: [] + groups: [] + user: + label: User + icon: fa-user + items: + - label: Manage User + route: user_people_index + groups: [] + - label: User Group + route: user_group_index + groups: [] + settings: + system: + label: System + icon: fa-tools + items: + - label: Basic Settings + route: taxonomy_create + groups: [] + - label: Text Formatter + route: teebb_formatter_index + groups: [] + groups: [] + mapping: directories: ['%kernel.project_dir%/src'] diff --git a/config/routes/teebb_core.yaml b/config/routes/teebb_core.yaml index 19d28e50e928ef9b29421f1e24be488f40947db8..c36fb8056dcff37540ed6defaaa6269b1724bf81 100644 --- a/config/routes/teebb_core.yaml +++ b/config/routes/teebb_core.yaml @@ -30,4 +30,8 @@ _teebb_formatter: prefix: /admin security: - resource: "@TeebbCoreBundle/Resources/config/routing/security.xml" \ No newline at end of file + resource: "@TeebbCoreBundle/Resources/config/routing/security.xml" + +_teebb_dashborad: + resource: "@TeebbCoreBundle/Resources/config/routing/dashboard.xml" + prefix: /admin \ No newline at end of file diff --git a/symfony.lock b/symfony.lock index cb0619ced95916ff8befdeef32d20abc2591fdff..831e03b2723d782df08cc67cad3a0f8cb0c2412c 100644 --- a/symfony.lock +++ b/symfony.lock @@ -137,6 +137,12 @@ "imagine/imagine": { "version": "1.2.3" }, + "knplabs/knp-menu": { + "version": "v3.1.2" + }, + "knplabs/knp-menu-bundle": { + "version": "v3.0.0" + }, "knplabs/knp-time-bundle": { "version": "v1.13.0" },