Skip to content

Instantly share code, notes, and snippets.

@charliepage88
Last active February 5, 2016 16:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charliepage88/4965388 to your computer and use it in GitHub Desktop.
Save charliepage88/4965388 to your computer and use it in GitHub Desktop.
Example config YAML file for Access Denied Listener for Symfony 2.
parameters:
kernel.listener.atd.access_denied.class: Acme\Bundle\Listener\AccessDeniedListener
services:
kernel.listener.accessDenied:
class: %kernel.listener.atd.access_denied.class%
scope: request
arguments: ["@session", "@router", "@request"]
tags:
- { name: kernel.event_listener, event: kernel.exception, method: onAccessDeniedException }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment