Skip to content

Access request in a menu listener #182

Description

@maxailloud

Hello,

I am using this technic to make my menu.

I would like to access the request in the listener to check the route, and make some action if the route match some predefined routes.

I succeed to inject the requets in my listener, but I got this error:

InactiveScopeException: You cannot create a service ("maxime_movie.menu.admin.listener") of an inactive scope ("request").

I don't understand why I got this exception, and why even if I got this I can use the request in my listener.
I tried using "strict=false" in my services.xml but it didn't work.

It's a workaround for making a breadcrumb, waiting for a better solution with a BreadCrumbRenderer (see KnpLabs/KnpMenu#45 ).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions