stiti/nestedmenubundle

Nested Menu Symfony Bundle

安装: 35

依赖者: 0

建议者: 0

安全: 0

星标: 2

关注者: 3

分支: 0

开放问题: 0

语言:JavaScript

类型:symfony-bundle

1.0.x-dev 2016-11-03 10:28 UTC

This package is not auto-updated.

Last update: 2024-09-23 13:01:29 UTC


README

欢迎使用 NestedMenuBundle - 一个用于创建嵌套菜单的 Symfony 扩展包

Admin Nested Menu Edit Item Delete Item

安装

步骤 1: 下载 Bundle


Open a command console, enter your project directory and execute the
following command to download the latest stable version of this bundle:


    $ composer require stiti/nestedmenubundle 1.0.x-dev


Step 2: Enable the Bundle
Then, enable the bundle by adding the following line in the ````app/AppKernel.php````
file of your project:

~~~~~~~~~~~~~~~~~~~~~~~~~

    <?php
    // app/AppKernel.php

    // ...
    class AppKernel extends Kernel
    {
        public function registerBundles()
        {
            $bundles = array(
                // ...

                new NestedMenuBundle\NestedMenuBundle(),
            );

            // ...
        }

        // ...
    }

Step 3: update schema

    php bin/console doctrine:schema:update --force
~~~~~~~~~~~~~~~~~~~~~~~~~

Step 4: install assets

    php bin/console assets:install
~~~~~~~~~~~~~~~~~~~~~~~~~

Step 5:foad Fixtures with DoctrineFixturesBundle

    php bin/console doctrine:fixtures:load


Usage

In your template twig insert this code
![Frontend Nested Menu](http://i.imgur.com/VE7YKdR.jpg)

    {{ nestedMenu() }}

在您的项目中导入路由文件

nested_menu:
    resource: "@NestedMenuBundle/Resources/config/routing.yml"
    prefix: /


activate Serializer Component in config.yml

    serializer:      { enable_annotations: true }

管理菜单

http://MY_PROJECT/menuNested