Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $route = new Route(
- "/{entity}/5/xyz/print",
- array(
- '_controller' => 'Drupal\xyz\Controller\xyzController::demo1',
- '_title' => 'xyz',
- ),
- array(
- '_permission' => 'access content',
- )
- );
- $collection->add('xyz.show_format.' . $entity_type, $route);
- //till here exists in routesubscriber.php
- public function demo1($entity) {
- return array(
- '#markup' => t('hello World!'),
- );
- }
- //content of controller
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement