Skip to content

Instantly share code, notes, and snippets.

@h3rj4n
Created January 16, 2014 12:28
Show Gist options
  • Save h3rj4n/8454212 to your computer and use it in GitHub Desktop.
Save h3rj4n/8454212 to your computer and use it in GitHub Desktop.
Drupal 8 Routing YAML example
custom.event.view:
path: '/admin/structure/custom/{custom}/manage/{custom_event}'
defaults:
_content: '\Drupal\custom\Controller\CustomEventController::page'
_title_callback: '\Drupal\custom\Controller\CustomEventController::pageTitle'
requirements:
_permission: 'administer custom'
custom.event.edit:
path: '/admin/structure/custom/{custom}/manage/{custom_event}/edit'
defaults:
_entity_form: 'custom_event.edit'
requirements:
_permission: 'administer custom'
custom.event.configure:
path: '/admin/structure/custom/{custom}/manage/{custom_event}/configure'
defaults:
_entity_form: 'custom_event.config'
requirements:
_permission: 'administer custom'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment