2017 © Pedro Peláez
 

symfony-bundle simple-menu-bundle

This is a Symfony Bundle that adds menu functionality to Sonata Admin.

image

kunicmarko/simple-menu-bundle

This is a Symfony Bundle that adds menu functionality to Sonata Admin.

  • Saturday, September 9, 2017
  • by kunicmarko20
  • Repository
  • 2 Watchers
  • 2 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Simple Menu Bundle

Build Status SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Simple Menu Bundle adds Menu to your Symfony application and is integrated with Sonata Admin., (*2)

This bundle depends on SonataAdminBundle and DoctrineExtensions, (*3)

Menu List Menu Children List, (*4)

Documentation

Installation

1. Add to composer.json to the require key, (*5)

composer require kunicmarko/simple-menu-bundle "v1.0.0-beta"

2. Register the bundle in app/AppKernel.php, (*6)

$bundles = array(
    // ...
    new KunicMarko\SimpleMenuBundle\SimpleMenuBundle(),
);

Add Gedmo Tree extensions mappings and if you are not using auto_mapping add bundle mappings, (*7)

# app/config/config.yml
   orm:
        entity_managers:
            default:
                mappings:
                    #...
                    SimpleMenuBundle: ~
                    gedmo_tree:
                        type: annotation
                        prefix: Gedmo\Tree\Entity
                        dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Entity"
                        alias: Gedmo
                        is_bundle: false

3. Update database, (*8)

app/console doctrine:schema:update --force

4. Clear cache, (*9)

app/console cache:clear

5. Install assets, (*10)

app/console assets:install

How to use

In your twig template you can render it with:, (*11)

{{ simple_menu_render('machine_name', level) }}

or if you want to render it on your own you can:, (*12)

{% set menu = simple_menu_fetch('machine_name', level) %}

Override template

You can override default template from config:, (*13)

# app/config/config.yml
simple_menu
    template:
        render: SimpleMenuBundle:Menu:render.html.twig

The Versions

09/09 2017

dev-master

9999999-dev https://github.com/kunicmarko20/SimpleMenuBundle

This is a Symfony Bundle that adds menu functionality to Sonata Admin.

  Sources   Download

MIT

The Requires

 

bundle symfony menu bundle symfony menu simple menu bundle sonata admin menu

29/08 2017

v1.0.0-beta

1.0.0.0-beta https://github.com/kunicmarko20/SimpleMenuBundle

This is a Symfony Bundle that adds menu functionality to Sonata Admin.

  Sources   Download

MIT

The Requires

 

bundle symfony menu bundle symfony menu simple menu bundle sonata admin menu