Questions tagged [knpmenubundle]

The KnpMenuBundle integrates the KnpMenu PHP library with Symfony2.

The KnpMenuBundle integrates the KnpMenu PHP library with Symfony2.

Once is integrated with Symfony, you can use 2 differents ways to build a menu:

  1. the "easy" way (basically the same as KnpMenu when using it as a stand alone library)
  2. and the more flexible method using a service.

Useful links:

122 questions
0
votes
1 answer

KNP Menu Bundle Translation Domain

I'm using Symfony 2.3 and the KnpMenuBundle. Is it possible to use a translation domain for menu items? Like this: $menu['management']->addChild( 'msg.user.list', array( 'route' => 'user_list', 'translation_domain' =>…
smartcoderx
  • 1,021
  • 2
  • 14
  • 32
0
votes
2 answers

Icons not showing with MopaBootstrapBundle and FontAwesome

I am trying to build a menu with icons for each element. I am using (or trying to) MopaBootstrapBundle KnpMenuBundle FontAwesome The menu structure is displaying and working fine, but the icons are not showing. Can anyone put me on the right…
matt_jay
  • 1,241
  • 1
  • 15
  • 33
0
votes
2 answers

Symfony2, Use QueryBuilder with KnpPaginatorBundle

I'm using KnpPaginatorBundle and I'm using QueryBuilder in Repository to select data. I was obliged to put parameters sort and direction in variables $sort and $direction and pass them to the Query to be able to do and orderBy. This code works but…
hous
  • 2,577
  • 2
  • 27
  • 66
0
votes
0 answers

Generate well formed routes from MenuBuilder class in Symfony2

I've this route defined in a controller: /** * @Secure(roles="IS_AUTHENTICATED_FULLY") * @Route( * "/proccess/{slug}", * requirements={"slug": "^([a-zA-Z0-9]*-[a-zA-Z0-9]*)+$"}, * name="registerRPNI" * ) */ public…
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
0
votes
2 answers

Access Container or securityContext or EntityManager from MenuBuilder through RequestVoter

I found this piece of code shared in a Gist (somewhere I lost the link) and I needed something like that so I started to use in my application but I have not yet fully understood and therefore I am having some problems. I'm trying to create dynamic…
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
0
votes
1 answer

composer install requirements error, and can't do composer update

I'm trying to install KnpMenuBundle here's my current composer.json: { "name": "symfony/framework-standard-edition", "license": "MIT", "type": "project", "description": "The \"Symfony Standard Edition\" distribution", "autoload":…
Rafael Adel
  • 7,673
  • 25
  • 77
  • 118
0
votes
2 answers

Knp menu bundle warnings after update to symfony 2.3

After updating symfony from 2.2 to 2.3, i've got new stange errors on all my pages and in my scripts: Deprecated: Knp\Menu\Silex\Voter\RouteVoter is deprecated because of namespace, use Knp\Menu\Matcher\Voter\RouteVoter instead. in…
Jaycreation
  • 2,029
  • 1
  • 15
  • 30
0
votes
1 answer

Unable to override KnpMenuBundle template

With ...MyBundle\Resources\views\Menu\knp_menu.html.twig, deleting the has no effect on the rendered menu. (Removing the tag is done to remove the space between inline list elements.) I have followed the advice provided in this answer,…
geoB
  • 4,578
  • 5
  • 37
  • 70
0
votes
2 answers

Symfony2 KnpMenuBundle - Following tutorial and came across this error

I followed this tutorial: https://github.com/KnpLabs/KnpMenuBundle/blob/master/Resources/doc/index.md#installation And have come across the following error: An exception has been thrown during the rendering of a template ("Unable to generate a URL…
dizzyd
  • 201
  • 1
  • 7
  • 15
0
votes
1 answer

Symfony2 bundle service separation

I am trying to implement custom menus for the backend and frontend of the site. Backend and frontend are in the separate bundles. The problem is, it seems that their services are shared (let's say I define one service (knp menu voter) in admin…
brgs
  • 774
  • 2
  • 7
  • 18
0
votes
1 answer

KnpMenuBundle, extend Builder by ContainerAware and Controller

I m using KNPMenuBuilder to create a menu. I would like to add query in my Builder.php but I need to extend Builder class by Controller. By default it`s extends by "ContainerAware". I would like to ask how to extends Builder class by two elements-…
Kosmonaft
  • 1,286
  • 2
  • 17
  • 30
0
votes
1 answer

KnpMenuBundle: why using 'route' instead of 'uri' transforms the element to ?

I'm creating a bundle with KNPMenuBundle on Symfony 2.3.x and it doesn't mark the current element, so, I thought the problem has to do with using 'uri' instead of 'route' since I'm on Symfony and all, the thing is, when I use route, the element…
Splendonia
  • 1,329
  • 3
  • 37
  • 59
0
votes
1 answer

KnpMenuBuilder Menu with FontAwesome icons

I try to create a menu builder in php, to reproduce this code :
0
votes
1 answer

Nested dynamic menu with knpmenubundle

I've built a menu using knpmenubundle, it's working really well and pulling the navigation dynamically from the database. However the client now wants to add a submenu to it. I've written a controller which will find child pages, however I can't see…
Alex Foxleigh
  • 1,784
  • 2
  • 21
  • 47
0
votes
1 answer

How to add a div to KnpMenu (Symfony2.1)

I would like to make a drowdown box whenever someone hovers over a menu button, im generating the menu with the KnpMenuBundle. What i would like to get is a structure like this:
  • ...
  • ...
  • Mats Rietdijk
    • 2,576
    • 3
    • 20
    • 25
    1 2 3
    8
    9