Issue #2376791 by dawehner, Wim Leers: Move all _content routing definitions to _controller
parent
df19f0b723
commit
edd7889694
|
|
@ -54,7 +54,7 @@ use Drupal\Core\Template\Attribute;
|
|||
* dblog.overview:
|
||||
* path: '/admin/reports/dblog'
|
||||
* defaults:
|
||||
* _content: '\Drupal\dblog\Controller\DbLogController::overview'
|
||||
* _controller: '\Drupal\dblog\Controller\DbLogController::overview'
|
||||
* _title: 'Recent log messages'
|
||||
* requirements:
|
||||
* _permission: 'access site reports'
|
||||
|
|
@ -69,8 +69,6 @@ use Drupal\Core\Template\Attribute;
|
|||
* and can also give other information, such as the page title and additional
|
||||
* arguments for the route controller method. There are several possibilities
|
||||
* for how to build the main content, including:
|
||||
* - _content: A callable, usually a method on a page controller class
|
||||
* (see @ref sec_controller below for details).
|
||||
* - _controller: A callable, usually a method on a page controller class
|
||||
* (see @ref sec_controller below for details).
|
||||
* - _form: A form controller class. See the
|
||||
|
|
|
|||
|
|
@ -61,18 +61,18 @@ class EntityRouteEnhancer implements RouteEnhancerInterface {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function enhance(array $defaults, Request $request) {
|
||||
if (empty($defaults['_content'])) {
|
||||
if (empty($defaults['_controller'])) {
|
||||
if (!empty($defaults['_entity_form'])) {
|
||||
$wrapper = new HtmlEntityFormController($this->resolver, $this->manager, $this->formBuilder, $defaults['_entity_form']);
|
||||
$defaults['_content'] = array($wrapper, 'getContentResult');
|
||||
$defaults['_controller'] = array($wrapper, 'getContentResult');
|
||||
}
|
||||
elseif (!empty($defaults['_entity_list'])) {
|
||||
$defaults['_content'] = '\Drupal\Core\Entity\Controller\EntityListController::listing';
|
||||
$defaults['_controller'] = '\Drupal\Core\Entity\Controller\EntityListController::listing';
|
||||
$defaults['entity_type'] = $defaults['_entity_list'];
|
||||
unset($defaults['_entity_list']);
|
||||
}
|
||||
elseif (!empty($defaults['_entity_view'])) {
|
||||
$defaults['_content'] = '\Drupal\Core\Entity\Controller\EntityViewController::view';
|
||||
$defaults['_controller'] = '\Drupal\Core\Entity\Controller\EntityViewController::view';
|
||||
if (strpos($defaults['_entity_view'], '.') !== FALSE) {
|
||||
// The _entity_view entry is of the form entity_type.view_mode.
|
||||
list($entity_type, $view_mode) = explode('.', $defaults['_entity_view']);
|
||||
|
|
|
|||
|
|
@ -49,8 +49,7 @@ class EntityResolverManager {
|
|||
* Gets the controller class using route defaults.
|
||||
*
|
||||
* By design we cannot support all possible routes, but just the ones which
|
||||
* use the defaults provided by core, which are _content, _controller
|
||||
* and _form.
|
||||
* use the defaults provided by core, which are _controller and _form.
|
||||
*
|
||||
* Rather than creating an instance of every controller determine the class
|
||||
* and method that would be used. This is not possible for the service:method
|
||||
|
|
@ -67,9 +66,6 @@ class EntityResolverManager {
|
|||
*/
|
||||
protected function getControllerClass(array $defaults) {
|
||||
$controller = NULL;
|
||||
if (isset($defaults['_content'])) {
|
||||
$controller = $defaults['_content'];
|
||||
}
|
||||
if (isset($defaults['_controller'])) {
|
||||
$controller = $defaults['_controller'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ class SpecialAttributesRouteSubscriber extends RouteSubscriberBase {
|
|||
RouteObjectInterface::ROUTE_OBJECT,
|
||||
RouteObjectInterface::ROUTE_NAME,
|
||||
'_content',
|
||||
'_controller',
|
||||
'_form',
|
||||
);
|
||||
foreach ($collection->all() as $name => $route) {
|
||||
|
|
|
|||
|
|
@ -25,9 +25,10 @@ namespace Drupal\Core\Render;
|
|||
* - exception handlers
|
||||
*
|
||||
* i.e. use this when rendering HTML pages in limited environments. Otherwise,
|
||||
* use a @code _content @endcode route, this will cause a main content renderer
|
||||
* (\Drupal\Core\Render\MainContent\MainContentRendererInterface) to be used,
|
||||
* and in case of a HTML request that will be
|
||||
* use a @code _controller @endcode route, and return a render array.
|
||||
* This will cause a main content renderer
|
||||
* (\Drupal\Core\Render\MainContent\MainContentRendererInterface) to be
|
||||
* used, and in case of a HTML request that will be
|
||||
* \Drupal\Core\Render\MainContent\HtmlRenderer.
|
||||
*
|
||||
* In fact, this is not only *typically* used in a limited environment, it even
|
||||
|
|
|
|||
|
|
@ -155,8 +155,9 @@ class HtmlRenderer implements MainContentRendererInterface {
|
|||
* If the selected display variant does not implement PageVariantInterface.
|
||||
*/
|
||||
protected function prepare(array $main_content, Request $request, RouteMatchInterface $route_match) {
|
||||
// If the _content result already is #type => page, we have no work to do:
|
||||
// the "main content" already is an entire "page" (see html.html.twig).
|
||||
// If the _controller result already is #type => page,
|
||||
// we have no work to do: The "main content" already is an entire "page"
|
||||
// (see html.html.twig).
|
||||
if (isset($main_content['#type']) && $main_content['#type'] === 'page') {
|
||||
$page = $main_content;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ use Drupal\Core\Routing\RouteMatchInterface;
|
|||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* The interface for "main content" (@code _content @endcode) renderers.
|
||||
* The interface for "main content" (@code _controller @endcode) renderers.
|
||||
*
|
||||
* Classes implementing this interface are able to render the main content (as
|
||||
* received from "_content" controllers) into a response of a certain format
|
||||
* received from controllers) into a response of a certain format
|
||||
* (HTML, JSON …) and/or in a certain decorated manner (e.g. in the case of the
|
||||
* default HTML main content renderer: with a page display variant applied).
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
aggregator.admin_overview:
|
||||
path: '/admin/config/services/aggregator'
|
||||
defaults:
|
||||
_content: '\Drupal\aggregator\Controller\AggregatorController::adminOverview'
|
||||
_controller: '\Drupal\aggregator\Controller\AggregatorController::adminOverview'
|
||||
_title: 'Feed aggregator'
|
||||
requirements:
|
||||
_permission: 'administer news feeds'
|
||||
|
|
@ -25,7 +25,7 @@ aggregator.feed_items_delete:
|
|||
aggregator.feed_refresh:
|
||||
path: '/admin/config/services/aggregator/update/{aggregator_feed}'
|
||||
defaults:
|
||||
_content: '\Drupal\aggregator\Controller\AggregatorController::feedRefresh'
|
||||
_controller: '\Drupal\aggregator\Controller\AggregatorController::feedRefresh'
|
||||
_title: 'Update items'
|
||||
requirements:
|
||||
_permission: 'administer news feeds'
|
||||
|
|
@ -42,7 +42,7 @@ aggregator.opml_add:
|
|||
aggregator.feed_add:
|
||||
path: '/aggregator/sources/add'
|
||||
defaults:
|
||||
_content: '\Drupal\aggregator\Controller\AggregatorController::feedAdd'
|
||||
_controller: '\Drupal\aggregator\Controller\AggregatorController::feedAdd'
|
||||
_title: 'Add feed'
|
||||
requirements:
|
||||
_permission: 'administer news feeds'
|
||||
|
|
@ -80,7 +80,7 @@ entity.aggregator_feed.delete_form:
|
|||
aggregator.page_last:
|
||||
path: '/aggregator'
|
||||
defaults:
|
||||
_content: '\Drupal\aggregator\Controller\AggregatorController::pageLast'
|
||||
_controller: '\Drupal\aggregator\Controller\AggregatorController::pageLast'
|
||||
_title: 'Feed aggregator'
|
||||
requirements:
|
||||
_permission: 'access news feeds'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
block.admin_demo:
|
||||
path: '/admin/structure/block/demo/{theme}'
|
||||
defaults:
|
||||
_content: '\Drupal\block\Controller\BlockController::demo'
|
||||
_controller: '\Drupal\block\Controller\BlockController::demo'
|
||||
_title_callback: 'theme_handler:getName'
|
||||
requirements:
|
||||
_access_theme: 'TRUE'
|
||||
|
|
@ -28,7 +28,7 @@ entity.block.edit_form:
|
|||
block.admin_display:
|
||||
path: '/admin/structure/block'
|
||||
defaults:
|
||||
_content: '\Drupal\block\Controller\BlockListController::listing'
|
||||
_controller: '\Drupal\block\Controller\BlockListController::listing'
|
||||
_title: 'Block layout'
|
||||
requirements:
|
||||
_permission: 'administer blocks'
|
||||
|
|
@ -36,7 +36,7 @@ block.admin_display:
|
|||
block.admin_display_theme:
|
||||
path: 'admin/structure/block/list/{theme}'
|
||||
defaults:
|
||||
_content: '\Drupal\block\Controller\BlockListController::listing'
|
||||
_controller: '\Drupal\block\Controller\BlockListController::listing'
|
||||
_title: 'Block layout'
|
||||
requirements:
|
||||
_access_theme: 'TRUE'
|
||||
|
|
@ -45,7 +45,7 @@ block.admin_display_theme:
|
|||
block.admin_add:
|
||||
path: '/admin/structure/block/add/{plugin_id}/{theme}'
|
||||
defaults:
|
||||
_content: '\Drupal\block\Controller\BlockAddController::blockAddConfigureForm'
|
||||
_controller: '\Drupal\block\Controller\BlockAddController::blockAddConfigureForm'
|
||||
theme: null
|
||||
_title: 'Configure block'
|
||||
requirements:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ block_content.type_list:
|
|||
block_content.add_page:
|
||||
path: '/block/add'
|
||||
defaults:
|
||||
_content: '\Drupal\block_content\Controller\BlockContentController::add'
|
||||
_controller: '\Drupal\block_content\Controller\BlockContentController::add'
|
||||
_title: 'Add custom block'
|
||||
options:
|
||||
_admin_route: TRUE
|
||||
|
|
@ -19,7 +19,7 @@ block_content.add_page:
|
|||
block_content.add_form:
|
||||
path: '/block/add/{block_content_type}'
|
||||
defaults:
|
||||
_content: '\Drupal\block_content\Controller\BlockContentController::addForm'
|
||||
_controller: '\Drupal\block_content\Controller\BlockContentController::addForm'
|
||||
_title_callback: 'Drupal\block_content\Controller\BlockContentController::getAddFormTitle'
|
||||
options:
|
||||
_admin_route: TRUE
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
book.render:
|
||||
path: '/book'
|
||||
defaults:
|
||||
_content: '\Drupal\book\Controller\BookController::bookRender'
|
||||
_controller: '\Drupal\book\Controller\BookController::bookRender'
|
||||
_title: 'Books'
|
||||
requirements:
|
||||
_permission: 'access content'
|
||||
|
|
@ -9,7 +9,7 @@ book.render:
|
|||
book.admin:
|
||||
path: '/admin/structure/book'
|
||||
defaults:
|
||||
_content: '\Drupal\book\Controller\BookController::adminOverview'
|
||||
_controller: '\Drupal\book\Controller\BookController::adminOverview'
|
||||
_title: 'Books'
|
||||
requirements:
|
||||
_permission: 'administer book outlines'
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ comment.admin:
|
|||
path: '/admin/content/comment'
|
||||
defaults:
|
||||
_title: 'Comments'
|
||||
_content: '\Drupal\comment\Controller\AdminController::adminPage'
|
||||
_controller: '\Drupal\comment\Controller\AdminController::adminPage'
|
||||
type: 'new'
|
||||
requirements:
|
||||
_permission: 'administer comments'
|
||||
|
|
@ -11,7 +11,7 @@ comment.admin_approval:
|
|||
path: '/admin/content/comment/approval'
|
||||
defaults:
|
||||
_title: 'Unapproved comments'
|
||||
_content: '\Drupal\comment\Controller\AdminController::adminPage'
|
||||
_controller: '\Drupal\comment\Controller\AdminController::adminPage'
|
||||
type: 'approval'
|
||||
requirements:
|
||||
_permission: 'administer comments'
|
||||
|
|
@ -28,7 +28,7 @@ comment.approve:
|
|||
path: '/comment/{comment}/approve'
|
||||
defaults:
|
||||
_title: 'Approve'
|
||||
_content: '\Drupal\comment\Controller\CommentController::commentApprove'
|
||||
_controller: '\Drupal\comment\Controller\CommentController::commentApprove'
|
||||
entity_type: 'comment'
|
||||
requirements:
|
||||
_entity_access: 'comment.approve'
|
||||
|
|
@ -53,7 +53,7 @@ entity.comment.delete_form:
|
|||
comment.reply:
|
||||
path: '/comment/reply/{entity_type}/{entity}/{field_name}/{pid}'
|
||||
defaults:
|
||||
_content: '\Drupal\comment\Controller\CommentController::getReplyForm'
|
||||
_controller: '\Drupal\comment\Controller\CommentController::getReplyForm'
|
||||
_title: 'Add new comment'
|
||||
pid: ~
|
||||
requirements:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ comment_test.report:
|
|||
path: '/comment/{comment}/report'
|
||||
defaults:
|
||||
_title: 'Report'
|
||||
_content: '\Drupal\comment_test\Controller\CommentTestController::commentReport'
|
||||
_controller: '\Drupal\comment_test\Controller\CommentTestController::commentReport'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
_csrf_token: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ config.sync:
|
|||
config.diff:
|
||||
path: '/admin/config/development/configuration/sync/diff/{source_name}/{target_name}'
|
||||
defaults:
|
||||
_content: '\Drupal\config\Controller\ConfigController::diff'
|
||||
_controller: '\Drupal\config\Controller\ConfigController::diff'
|
||||
target_name: NULL
|
||||
requirements:
|
||||
_permission: 'synchronize configuration'
|
||||
|
|
@ -17,7 +17,7 @@ config.diff:
|
|||
config.diff_collection:
|
||||
path: '/admin/config/development/configuration/sync/diff_collection/{collection}/{source_name}/{target_name}'
|
||||
defaults:
|
||||
_content: '\Drupal\config\Controller\ConfigController::diff'
|
||||
_controller: '\Drupal\config\Controller\ConfigController::diff'
|
||||
target_name: NULL
|
||||
requirements:
|
||||
_permission: 'synchronize configuration'
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ entity.config_test.edit_form_config_test_no_status:
|
|||
entity.config_test.enable:
|
||||
path: '/admin/structure/config_test/manage/{config_test}/enable'
|
||||
defaults:
|
||||
_content: '\Drupal\config_test\ConfigTestController::enable'
|
||||
_controller: '\Drupal\config_test\ConfigTestController::enable'
|
||||
entity_type: 'config_test'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -40,7 +40,7 @@ entity.config_test.enable:
|
|||
entity.config_test.disable:
|
||||
path: '/admin/structure/config_test/manage/{config_test}/disable'
|
||||
defaults:
|
||||
_content: '\Drupal\config_test\ConfigTestController::disable'
|
||||
_controller: '\Drupal\config_test\ConfigTestController::disable'
|
||||
entity_type: 'config_test'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -62,6 +62,6 @@ entity.config_test.delete_form_config_test_no_status:
|
|||
config_test.schema_listener:
|
||||
path: '/config_test/schema_listener'
|
||||
defaults:
|
||||
_content: '\Drupal\config_test\SchemaListenerController::test'
|
||||
_controller: '\Drupal\config_test\SchemaListenerController::test'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ config_translation.mapper_list:
|
|||
path: '/admin/config/regional/config-translation'
|
||||
defaults:
|
||||
_title: 'Configuration translation'
|
||||
_content: '\Drupal\config_translation\Controller\ConfigTranslationMapperList::render'
|
||||
_controller: '\Drupal\config_translation\Controller\ConfigTranslationMapperList::render'
|
||||
requirements:
|
||||
_permission: 'translate configuration'
|
||||
|
||||
config_translation.entity_list:
|
||||
path: '/admin/config/regional/config-translation/{mapper_id}'
|
||||
defaults:
|
||||
_content: '\Drupal\config_translation\Controller\ConfigTranslationListController::listing'
|
||||
_controller: '\Drupal\config_translation\Controller\ConfigTranslationListController::listing'
|
||||
requirements:
|
||||
_permission: 'translate configuration'
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ class ConfigNamesMapper extends PluginBase implements ConfigMapperInterface, Con
|
|||
$route = new Route(
|
||||
$this->getBaseRoute()->getPath() . '/translate',
|
||||
array(
|
||||
'_content' => '\Drupal\config_translation\Controller\ConfigTranslationController::itemPage',
|
||||
'_controller' => '\Drupal\config_translation\Controller\ConfigTranslationController::itemPage',
|
||||
'plugin_id' => $this->getPluginId(),
|
||||
),
|
||||
array('_config_translation_overview_access' => 'TRUE')
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ class ConfigNamesMapperTest extends UnitTestCase {
|
|||
public function testGetOverviewRoute() {
|
||||
$expected = new Route('/admin/config/system/site-information/translate',
|
||||
array(
|
||||
'_content' => '\Drupal\config_translation\Controller\ConfigTranslationController::itemPage',
|
||||
'_controller' => '\Drupal\config_translation\Controller\ConfigTranslationController::itemPage',
|
||||
'plugin_id' => 'system.site_information_settings',
|
||||
),
|
||||
array(
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ contact.site_page:
|
|||
path: '/contact'
|
||||
defaults:
|
||||
_title: 'Contact'
|
||||
_content: '\Drupal\contact\Controller\ContactController::contactSitePage'
|
||||
_controller: '\Drupal\contact\Controller\ContactController::contactSitePage'
|
||||
contact_form: NULL
|
||||
requirements:
|
||||
_permission: 'access site-wide contact form'
|
||||
|
|
@ -43,7 +43,7 @@ contact.site_page_form:
|
|||
path: '/contact/{contact_form}'
|
||||
defaults:
|
||||
_title: 'Contact'
|
||||
_content: '\Drupal\contact\Controller\ContactController::contactSitePage'
|
||||
_controller: '\Drupal\contact\Controller\ContactController::contactSitePage'
|
||||
requirements:
|
||||
_entity_access: 'contact_form.view'
|
||||
|
||||
|
|
@ -51,6 +51,6 @@ entity.user.contact_form:
|
|||
path: '/user/{user}/contact'
|
||||
defaults:
|
||||
_title: 'Contact'
|
||||
_content: '\Drupal\contact\Controller\ContactController::contactPersonalPage'
|
||||
_controller: '\Drupal\contact\Controller\ContactController::contactPersonalPage'
|
||||
requirements:
|
||||
_access_contact_personal_tab: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class ContentTranslationRouteSubscriber extends RouteSubscriberBase {
|
|||
$route = new Route(
|
||||
$path,
|
||||
array(
|
||||
'_content' => '\Drupal\content_translation\Controller\ContentTranslationController::overview',
|
||||
'_controller' => '\Drupal\content_translation\Controller\ContentTranslationController::overview',
|
||||
'entity_type_id' => $entity_type_id,
|
||||
),
|
||||
array(
|
||||
|
|
@ -76,7 +76,7 @@ class ContentTranslationRouteSubscriber extends RouteSubscriberBase {
|
|||
$route = new Route(
|
||||
$path . '/add/{source}/{target}',
|
||||
array(
|
||||
'_content' => '\Drupal\content_translation\Controller\ContentTranslationController::add',
|
||||
'_controller' => '\Drupal\content_translation\Controller\ContentTranslationController::add',
|
||||
'source' => NULL,
|
||||
'target' => NULL,
|
||||
'_title' => 'Add',
|
||||
|
|
@ -108,7 +108,7 @@ class ContentTranslationRouteSubscriber extends RouteSubscriberBase {
|
|||
$route = new Route(
|
||||
$path . '/edit/{language}',
|
||||
array(
|
||||
'_content' => '\Drupal\content_translation\Controller\ContentTranslationController::edit',
|
||||
'_controller' => '\Drupal\content_translation\Controller\ContentTranslationController::edit',
|
||||
'language' => NULL,
|
||||
'_title' => 'Edit',
|
||||
'entity_type_id' => $entity_type_id,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
dblog.overview:
|
||||
path: '/admin/reports/dblog'
|
||||
defaults:
|
||||
_content: '\Drupal\dblog\Controller\DbLogController::overview'
|
||||
_controller: '\Drupal\dblog\Controller\DbLogController::overview'
|
||||
_title: 'Recent log messages'
|
||||
requirements:
|
||||
_permission: 'access site reports'
|
||||
|
|
@ -17,7 +17,7 @@ dblog.confirm:
|
|||
dblog.event:
|
||||
path: '/admin/reports/dblog/event/{event_id}'
|
||||
defaults:
|
||||
_content: '\Drupal\dblog\Controller\DbLogController::eventDetails'
|
||||
_controller: '\Drupal\dblog\Controller\DbLogController::eventDetails'
|
||||
_title: 'Details'
|
||||
requirements:
|
||||
_permission: 'access site reports'
|
||||
|
|
@ -26,7 +26,7 @@ dblog.page_not_found:
|
|||
path: '/admin/reports/page-not-found'
|
||||
defaults:
|
||||
_title: "Top 'page not found' errors"
|
||||
_content: '\Drupal\dblog\Controller\DbLogController::topLogMessages'
|
||||
_controller: '\Drupal\dblog\Controller\DbLogController::topLogMessages'
|
||||
type: 'page not found'
|
||||
requirements:
|
||||
_permission: 'access site reports'
|
||||
|
|
@ -35,7 +35,7 @@ dblog.access_denied:
|
|||
path: '/admin/reports/access-denied'
|
||||
defaults:
|
||||
_title: "Top 'access denied' errors"
|
||||
_content: '\Drupal\dblog\Controller\DbLogController::topLogMessages'
|
||||
_controller: '\Drupal\dblog\Controller\DbLogController::topLogMessages'
|
||||
type: 'access denied'
|
||||
requirements:
|
||||
_permission: 'access site reports'
|
||||
|
|
@ -43,7 +43,7 @@ dblog.access_denied:
|
|||
dblog.search:
|
||||
path: '/admin/reports/search'
|
||||
defaults:
|
||||
_content: '\Drupal\dblog\Controller\DbLogController::topLogMessages'
|
||||
_controller: '\Drupal\dblog\Controller\DbLogController::topLogMessages'
|
||||
_title: 'Top search phrases'
|
||||
type: 'search'
|
||||
requirements:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ field_ui.list:
|
|||
field_ui.display_mode:
|
||||
path: '/admin/structure/display-modes'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'Display modes'
|
||||
requirements:
|
||||
_permission: 'administer display modes'
|
||||
|
|
@ -25,7 +25,7 @@ field_ui.entity_view_mode_list:
|
|||
field_ui.entity_view_mode_add:
|
||||
path: '/admin/structure/display-modes/view/add'
|
||||
defaults:
|
||||
_content: '\Drupal\field_ui\Controller\EntityDisplayModeController::viewModeTypeSelection'
|
||||
_controller: '\Drupal\field_ui\Controller\EntityDisplayModeController::viewModeTypeSelection'
|
||||
_title: 'Choose view mode entity type'
|
||||
requirements:
|
||||
_permission: 'administer display modes'
|
||||
|
|
@ -65,7 +65,7 @@ field_ui.entity_form_mode_list:
|
|||
field_ui.entity_form_mode_add:
|
||||
path: '/admin/structure/display-modes/form/add'
|
||||
defaults:
|
||||
_content: '\Drupal\field_ui\Controller\EntityDisplayModeController::formModeTypeSelection'
|
||||
_controller: '\Drupal\field_ui\Controller\EntityDisplayModeController::formModeTypeSelection'
|
||||
_title: 'Choose form mode entity type'
|
||||
requirements:
|
||||
_permission: 'administer display modes'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
filter.tips_all:
|
||||
path: '/filter/tips'
|
||||
defaults:
|
||||
_content: '\Drupal\filter\Controller\FilterController::filterTips'
|
||||
_controller: '\Drupal\filter\Controller\FilterController::filterTips'
|
||||
_title: 'Compose tips'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -9,7 +9,7 @@ filter.tips_all:
|
|||
filter.tips:
|
||||
path: '/filter/tips/{filter_format}'
|
||||
defaults:
|
||||
_content: '\Drupal\filter\Controller\FilterController::filterTips'
|
||||
_controller: '\Drupal\filter\Controller\FilterController::filterTips'
|
||||
_title: 'Compose tips'
|
||||
requirements:
|
||||
_entity_access: 'filter_format.use'
|
||||
|
|
@ -17,7 +17,7 @@ filter.tips:
|
|||
filter.admin_overview:
|
||||
path: '/admin/config/content/formats'
|
||||
defaults:
|
||||
_content: '\Drupal\Core\Entity\Controller\EntityListController::listing'
|
||||
_controller: '\Drupal\Core\Entity\Controller\EntityListController::listing'
|
||||
entity_type: 'filter_format'
|
||||
_title: 'Text formats and editors'
|
||||
requirements:
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ forum.settings:
|
|||
forum.index:
|
||||
path: '/forum'
|
||||
defaults:
|
||||
_content: '\Drupal\forum\Controller\ForumController::forumIndex'
|
||||
_controller: '\Drupal\forum\Controller\ForumController::forumIndex'
|
||||
_title: 'Forums'
|
||||
requirements:
|
||||
_permission: 'access content'
|
||||
|
|
@ -25,7 +25,7 @@ forum.index:
|
|||
forum.page:
|
||||
path: '/forum/{taxonomy_term}'
|
||||
defaults:
|
||||
_content: '\Drupal\forum\Controller\ForumController::forumPage'
|
||||
_controller: '\Drupal\forum\Controller\ForumController::forumPage'
|
||||
_title_callback: '\Drupal\taxonomy\Controller\TaxonomyController::termTitle'
|
||||
requirements:
|
||||
_permission: 'access content'
|
||||
|
|
@ -33,7 +33,7 @@ forum.page:
|
|||
forum.add_container:
|
||||
path: '/admin/structure/forum/add/container'
|
||||
defaults:
|
||||
_content: '\Drupal\forum\Controller\ForumController::addContainer'
|
||||
_controller: '\Drupal\forum\Controller\ForumController::addContainer'
|
||||
_title: 'Add container'
|
||||
requirements:
|
||||
_permission: 'administer forums'
|
||||
|
|
@ -41,7 +41,7 @@ forum.add_container:
|
|||
forum.add_forum:
|
||||
path: '/admin/structure/forum/add/forum'
|
||||
defaults:
|
||||
_content: '\Drupal\forum\Controller\ForumController::addForum'
|
||||
_controller: '\Drupal\forum\Controller\ForumController::addForum'
|
||||
_title: 'Add forum'
|
||||
requirements:
|
||||
_permission: 'administer forums'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
help.main:
|
||||
path: '/admin/help'
|
||||
defaults:
|
||||
_content: '\Drupal\help\Controller\HelpController::helpMain'
|
||||
_controller: '\Drupal\help\Controller\HelpController::helpMain'
|
||||
_title: 'Help'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -9,7 +9,7 @@ help.main:
|
|||
help.page:
|
||||
path: '/admin/help/{name}'
|
||||
defaults:
|
||||
_content: '\Drupal\help\Controller\HelpController::helpPage'
|
||||
_controller: '\Drupal\help\Controller\HelpController::helpPage'
|
||||
_title: 'Help'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
language_test.l_active_class:
|
||||
path: '/language_test/type-link-active-class'
|
||||
defaults:
|
||||
_content: '\Drupal\language_test\Controller\LanguageTestController::typeLinkActiveClass'
|
||||
_controller: '\Drupal\language_test\Controller\LanguageTestController::typeLinkActiveClass'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ locale.check_translation:
|
|||
locale.translate_page:
|
||||
path: '/admin/config/regional/translate'
|
||||
defaults:
|
||||
_content: '\Drupal\locale\Controller\LocaleController::translatePage'
|
||||
_controller: '\Drupal\locale\Controller\LocaleController::translatePage'
|
||||
_title: 'User interface translation'
|
||||
requirements:
|
||||
_permission: 'translate interface'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
entity.menu.add_link_form:
|
||||
path: '/admin/structure/menu/manage/{menu}/add'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_link_content\Controller\MenuController::addLink'
|
||||
_controller: '\Drupal\menu_link_content\Controller\MenuController::addLink'
|
||||
_title: 'Add menu link'
|
||||
requirements:
|
||||
_entity_create_access: 'menu_link_content'
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ node.add_page:
|
|||
path: '/node/add'
|
||||
defaults:
|
||||
_title: 'Add content'
|
||||
_content: '\Drupal\node\Controller\NodeController::addPage'
|
||||
_controller: '\Drupal\node\Controller\NodeController::addPage'
|
||||
options:
|
||||
_access_mode: 'ANY'
|
||||
_node_operation_route: TRUE
|
||||
|
|
@ -29,7 +29,7 @@ node.add_page:
|
|||
node.add:
|
||||
path: '/node/add/{node_type}'
|
||||
defaults:
|
||||
_content: '\Drupal\node\Controller\NodeController::add'
|
||||
_controller: '\Drupal\node\Controller\NodeController::add'
|
||||
_title_callback: '\Drupal\node\Controller\NodeController::addPageTitle'
|
||||
requirements:
|
||||
_node_add_access: 'node:{node_type}'
|
||||
|
|
@ -39,7 +39,7 @@ node.add:
|
|||
entity.node.preview:
|
||||
path: '/node/preview/{node_preview}/{view_mode_id}'
|
||||
defaults:
|
||||
_content: '\Drupal\node\Controller\NodePreviewController::view'
|
||||
_controller: '\Drupal\node\Controller\NodePreviewController::view'
|
||||
_title_callback: '\Drupal\node\Controller\NodePreviewController::title'
|
||||
requirements:
|
||||
_node_preview_access: '{node_preview}'
|
||||
|
|
@ -51,7 +51,7 @@ entity.node.preview:
|
|||
entity.node.canonical:
|
||||
path: '/node/{node}'
|
||||
defaults:
|
||||
_content: '\Drupal\node\Controller\NodeViewController::view'
|
||||
_controller: '\Drupal\node\Controller\NodeViewController::view'
|
||||
_title_callback: '\Drupal\node\Controller\NodeViewController::title'
|
||||
requirements:
|
||||
_entity_access: 'node.view'
|
||||
|
|
@ -70,7 +70,7 @@ entity.node.version_history:
|
|||
path: '/node/{node}/revisions'
|
||||
defaults:
|
||||
_title: 'Revisions'
|
||||
_content: '\Drupal\node\Controller\NodeController::revisionOverview'
|
||||
_controller: '\Drupal\node\Controller\NodeController::revisionOverview'
|
||||
requirements:
|
||||
_access_node_revision: 'view'
|
||||
options:
|
||||
|
|
@ -79,7 +79,7 @@ entity.node.version_history:
|
|||
node.revision_show:
|
||||
path: '/node/{node}/revisions/{node_revision}/view'
|
||||
defaults:
|
||||
_content: '\Drupal\node\Controller\NodeController::revisionShow'
|
||||
_controller: '\Drupal\node\Controller\NodeController::revisionShow'
|
||||
_title_callback: '\Drupal\node\Controller\NodeController::revisionPageTitle'
|
||||
requirements:
|
||||
_access_node_revision: 'view'
|
||||
|
|
@ -107,7 +107,7 @@ node.revision_delete_confirm:
|
|||
node.overview_types:
|
||||
path: '/admin/structure/types'
|
||||
defaults:
|
||||
_content: '\Drupal\Core\Entity\Controller\EntityListController::listing'
|
||||
_controller: '\Drupal\Core\Entity\Controller\EntityListController::listing'
|
||||
entity_type: 'node_type'
|
||||
_title: 'Content types'
|
||||
requirements:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ path.admin_overview:
|
|||
path: '/admin/config/search/path'
|
||||
defaults:
|
||||
_title: 'URL aliases'
|
||||
_content: '\Drupal\path\Controller\PathController::adminOverview'
|
||||
_controller: '\Drupal\path\Controller\PathController::adminOverview'
|
||||
keys: NULL
|
||||
requirements:
|
||||
_permission: 'administer url aliases'
|
||||
|
|
@ -19,7 +19,7 @@ path.admin_overview_filter:
|
|||
path: '/admin/config/search/path/filter'
|
||||
defaults:
|
||||
_title: 'URL aliases'
|
||||
_content: '\Drupal\path\Controller\PathController::adminOverview'
|
||||
_controller: '\Drupal\path\Controller\PathController::adminOverview'
|
||||
requirements:
|
||||
_permission: 'administer url aliases'
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class SearchPageRoutes implements ContainerInjectionInterface {
|
|||
$routes['search.view'] = new Route(
|
||||
'/search',
|
||||
array(
|
||||
'_content' => 'Drupal\search\Controller\SearchController::redirectSearchPage',
|
||||
'_controller' => 'Drupal\search\Controller\SearchController::redirectSearchPage',
|
||||
'_title' => 'Search',
|
||||
'entity' => $default_page,
|
||||
),
|
||||
|
|
@ -79,7 +79,7 @@ class SearchPageRoutes implements ContainerInjectionInterface {
|
|||
$routes["search.view_$entity_id"] = new Route(
|
||||
'/search/' . $entity->getPath(),
|
||||
array(
|
||||
'_content' => 'Drupal\search\Controller\SearchController::view',
|
||||
'_controller' => 'Drupal\search\Controller\SearchController::view',
|
||||
'_title' => 'Search',
|
||||
'entity' => $entity_id,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ entity.shortcut_set.customize_form:
|
|||
shortcut.link_add:
|
||||
path: '/admin/config/user-interface/shortcut/manage/{shortcut_set}/add-link'
|
||||
defaults:
|
||||
_content: '\Drupal\shortcut\Controller\ShortcutController::addForm'
|
||||
_controller: '\Drupal\shortcut\Controller\ShortcutController::addForm'
|
||||
_title: 'Add link'
|
||||
requirements:
|
||||
_entity_create_access: 'shortcut:{shortcut_set}'
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ use Drupal\Core\Render\Element;
|
|||
* the entity system will load the corresponding entity item and pass it in as
|
||||
* an object to the controller for the route.
|
||||
* - defaults: For entity form routes, use _entity_form rather than the generic
|
||||
* _content or _form. The value is composed of the entity type machine name
|
||||
* _controller or _form. The value is composed of the entity type machine name
|
||||
* and a form controller type from the entity annotation (see @ref define
|
||||
* above more more on controllers and annotation). So, in this example,
|
||||
* block.default refers to the 'default' form controller on the block entity
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
system.ajax:
|
||||
path: '/system/ajax'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\FormAjaxController::content'
|
||||
_controller: '\Drupal\system\Controller\FormAjaxController::content'
|
||||
options:
|
||||
_theme: ajax_base_page
|
||||
requirements:
|
||||
|
|
@ -10,7 +10,7 @@ system.ajax:
|
|||
system.403:
|
||||
path: '/system/403'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\Http4xxController:on403'
|
||||
_controller: '\Drupal\system\Controller\Http4xxController:on403'
|
||||
_title: 'Access denied'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -18,7 +18,7 @@ system.403:
|
|||
system.404:
|
||||
path: '/system/404'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\Http4xxController:on404'
|
||||
_controller: '\Drupal\system\Controller\Http4xxController:on404'
|
||||
_title: 'Page not found'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -26,7 +26,7 @@ system.404:
|
|||
system.admin:
|
||||
path: '/admin'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'Administration'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -34,7 +34,7 @@ system.admin:
|
|||
system.admin_structure:
|
||||
path: '/admin/structure'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'Structure'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -42,7 +42,7 @@ system.admin_structure:
|
|||
system.admin_reports:
|
||||
path: '/admin/reports'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'Reports'
|
||||
requirements:
|
||||
_permission: 'access site reports'
|
||||
|
|
@ -50,7 +50,7 @@ system.admin_reports:
|
|||
system.admin_config_media:
|
||||
path: '/admin/config/media'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'Media'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -58,7 +58,7 @@ system.admin_config_media:
|
|||
system.admin_config_services:
|
||||
path: '/admin/config/services'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'Web services'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -66,7 +66,7 @@ system.admin_config_services:
|
|||
system.admin_config_development:
|
||||
path: '/admin/config/development'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'Development'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -74,7 +74,7 @@ system.admin_config_development:
|
|||
system.admin_config_regional:
|
||||
path: '/admin/config/regional'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'Regional and language'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -82,7 +82,7 @@ system.admin_config_regional:
|
|||
system.admin_config_search:
|
||||
path: '/admin/config/search'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'Search and metadata'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -90,7 +90,7 @@ system.admin_config_search:
|
|||
system.admin_config_system:
|
||||
path: '/admin/config/system'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'System'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -98,7 +98,7 @@ system.admin_config_system:
|
|||
system.admin_config_ui:
|
||||
path: '/admin/config/user-interface'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'User interface'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -106,7 +106,7 @@ system.admin_config_ui:
|
|||
system.admin_config_workflow:
|
||||
path: '/admin/config/workflow'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'Workflow'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -114,7 +114,7 @@ system.admin_config_workflow:
|
|||
system.admin_config_content:
|
||||
path: '/admin/config/content'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'Content authoring'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -288,7 +288,7 @@ system.theme_install:
|
|||
system.status:
|
||||
path: '/admin/reports/status'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemInfoController::status'
|
||||
_controller: '\Drupal\system\Controller\SystemInfoController::status'
|
||||
_title: 'Status report'
|
||||
requirements:
|
||||
_permission: 'administer site configuration'
|
||||
|
|
@ -307,7 +307,7 @@ system.php:
|
|||
system.admin_index:
|
||||
path: '/admin/index'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\AdminController::index'
|
||||
_controller: '\Drupal\system\Controller\AdminController::index'
|
||||
_title: 'Administration'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -342,7 +342,7 @@ system.themes_page:
|
|||
path: '/admin/appearance'
|
||||
defaults:
|
||||
_title: 'Appearance'
|
||||
_content: '\Drupal\system\Controller\SystemController::themesPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::themesPage'
|
||||
requirements:
|
||||
_permission: 'administer themes'
|
||||
|
||||
|
|
@ -350,7 +350,7 @@ system.theme_set_default:
|
|||
path: '/admin/appearance/default'
|
||||
defaults:
|
||||
_title: 'Set as default theme'
|
||||
_content: '\Drupal\system\Controller\ThemeController::setDefaultTheme'
|
||||
_controller: '\Drupal\system\Controller\ThemeController::setDefaultTheme'
|
||||
requirements:
|
||||
_permission: 'administer themes'
|
||||
_csrf_token: 'TRUE'
|
||||
|
|
@ -413,7 +413,7 @@ system.timezone:
|
|||
system.admin_config:
|
||||
path: '/admin/config'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::overview'
|
||||
_controller: '\Drupal\system\Controller\SystemController::overview'
|
||||
link_id: 'system.admin_config'
|
||||
_title: 'Configuration'
|
||||
requirements:
|
||||
|
|
@ -422,7 +422,7 @@ system.admin_config:
|
|||
system.batch_page.html:
|
||||
path: '/batch'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\BatchController::batchPage'
|
||||
_controller: '\Drupal\system\Controller\BatchController::batchPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
_format: 'html'
|
||||
|
|
@ -451,7 +451,7 @@ system.db_update:
|
|||
system.admin_content:
|
||||
path: '/admin/content'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::overview'
|
||||
_controller: '\Drupal\system\Controller\SystemController::overview'
|
||||
link_id: 'system.admin_content'
|
||||
_title: 'Content'
|
||||
requirements:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ ajax_test.dialog_contents:
|
|||
path: '/ajax-test/dialog-contents'
|
||||
defaults:
|
||||
_title: 'AJAX Dialog contents routing'
|
||||
_content: '\Drupal\ajax_test\Controller\AjaxTestController::dialogContents'
|
||||
_controller: '\Drupal\ajax_test\Controller\AjaxTestController::dialogContents'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ ajax_test.dialog_form:
|
|||
ajax_test.dialog:
|
||||
path: '/ajax-test/dialog'
|
||||
defaults:
|
||||
_content: '\Drupal\ajax_test\Controller\AjaxTestController::dialog'
|
||||
_controller: '\Drupal\ajax_test\Controller\AjaxTestController::dialog'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
batch_test.redirect:
|
||||
path: '/batch-test/redirect'
|
||||
defaults:
|
||||
_content: '\Drupal\batch_test\Controller\BatchTestController::testRedirect'
|
||||
_controller: '\Drupal\batch_test\Controller\BatchTestController::testRedirect'
|
||||
_title: 'Redirect'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -9,7 +9,7 @@ batch_test.redirect:
|
|||
batch_test.large_percentage:
|
||||
path: '/batch-test/large-percentage'
|
||||
defaults:
|
||||
_content: '\Drupal\batch_test\Controller\BatchTestController::testLargePercentage'
|
||||
_controller: '\Drupal\batch_test\Controller\BatchTestController::testLargePercentage'
|
||||
_title: 'Simple page with batch over 100% complete'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -17,7 +17,7 @@ batch_test.large_percentage:
|
|||
batch_test.nested_programmatic:
|
||||
path: '/batch-test/nested-programmatic/{value}'
|
||||
defaults:
|
||||
_content: '\Drupal\batch_test\Controller\BatchTestController::testNestedDrupalFormSubmit'
|
||||
_controller: '\Drupal\batch_test\Controller\BatchTestController::testNestedDrupalFormSubmit'
|
||||
_title: 'Nested programmatic'
|
||||
value: '1'
|
||||
requirements:
|
||||
|
|
@ -26,7 +26,7 @@ batch_test.nested_programmatic:
|
|||
batch_test.no_form:
|
||||
path: '/batch-test/no-form'
|
||||
defaults:
|
||||
_content: '\Drupal\batch_test\Controller\BatchTestController::testNoForm'
|
||||
_controller: '\Drupal\batch_test\Controller\BatchTestController::testNoForm'
|
||||
_title: 'Simple page'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -58,7 +58,7 @@ batch_test.chained:
|
|||
batch_test.programmatic:
|
||||
path: '/batch-test/programmatic/{value}'
|
||||
defaults:
|
||||
_content: '\Drupal\batch_test\Controller\BatchTestController::testProgrammatic'
|
||||
_controller: '\Drupal\batch_test\Controller\BatchTestController::testProgrammatic'
|
||||
_title: 'Programmatic'
|
||||
value: '1'
|
||||
requirements:
|
||||
|
|
@ -67,6 +67,6 @@ batch_test.programmatic:
|
|||
batch_test.test_theme:
|
||||
path: '/admin/batch-test/test-theme'
|
||||
defaults:
|
||||
_content: '\Drupal\batch_test\Controller\BatchTestController::testThemeBatch'
|
||||
_controller: '\Drupal\batch_test\Controller\BatchTestController::testThemeBatch'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
common_test.l_active_class:
|
||||
path: '/common-test/type-link-active-class'
|
||||
defaults:
|
||||
_content: '\Drupal\common_test\Controller\CommonTestController::typeLinkActiveClass'
|
||||
_controller: '\Drupal\common_test\Controller\CommonTestController::typeLinkActiveClass'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -16,6 +16,6 @@ common_test.js_and_css_querystring:
|
|||
path: '/common-test/query-string'
|
||||
defaults:
|
||||
_title: 'Test querystring'
|
||||
_content: '\Drupal\common_test\Controller\CommonTestController::jsAndCssQuerystring'
|
||||
_controller: '\Drupal\common_test\Controller\CommonTestController::jsAndCssQuerystring'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -1,35 +1,35 @@
|
|||
database_test.db_query_temporary:
|
||||
path: '/database_test/db_query_temporary'
|
||||
defaults:
|
||||
_content: '\Drupal\database_test\Controller\DatabaseTestController::dbQueryTemporary'
|
||||
_controller: '\Drupal\database_test\Controller\DatabaseTestController::dbQueryTemporary'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
database_test.pager_query_even:
|
||||
path: '/database_test/pager_query_even/{limit}'
|
||||
defaults:
|
||||
_content: '\Drupal\database_test\Controller\DatabaseTestController::pagerQueryEven'
|
||||
_controller: '\Drupal\database_test\Controller\DatabaseTestController::pagerQueryEven'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
database_test.pager_query_odd:
|
||||
path: '/database_test/pager_query_odd/{limit}'
|
||||
defaults:
|
||||
_content: '\Drupal\database_test\Controller\DatabaseTestController::pagerQueryOdd'
|
||||
_controller: '\Drupal\database_test\Controller\DatabaseTestController::pagerQueryOdd'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
database_test.tablesort:
|
||||
path: '/database_test/tablesort'
|
||||
defaults:
|
||||
_content: '\Drupal\database_test\Controller\DatabaseTestController::testTablesort'
|
||||
_controller: '\Drupal\database_test\Controller\DatabaseTestController::testTablesort'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
database_test.tablesort_first:
|
||||
path: '/database_test/tablesort_first'
|
||||
defaults:
|
||||
_content: '\Drupal\database_test\Controller\DatabaseTestController::testTablesortFirst'
|
||||
_controller: '\Drupal\database_test\Controller\DatabaseTestController::testTablesortFirst'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ entity.entity_test.render_no_view_mode:
|
|||
entity.entity_test.list_referencing_entities:
|
||||
path: '/entity_test/list/{entity_reference_field_name}/{referenced_entity_type}/{referenced_entity_id}'
|
||||
defaults:
|
||||
_content: '\Drupal\entity_test\Controller\EntityTestController::listReferencingEntities'
|
||||
_controller: '\Drupal\entity_test\Controller\EntityTestController::listReferencingEntities'
|
||||
_title: 'List entity_test entities referencing the given entity'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -63,7 +63,7 @@ entity.entity_test.list_referencing_entities:
|
|||
entity.entity_test.list_labels_alphabetically:
|
||||
path: '/entity_test/list_labels_alphabetically/{entity_type_id}'
|
||||
defaults:
|
||||
_content: '\Drupal\entity_test\Controller\EntityTestController::listEntitiesAlphabetically'
|
||||
_controller: '\Drupal\entity_test\Controller\EntityTestController::listEntitiesAlphabetically'
|
||||
_title: 'List labels of entities of the given entity type alphabetically'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -71,7 +71,7 @@ entity.entity_test.list_labels_alphabetically:
|
|||
entity.entity_test.list_empty:
|
||||
path: '/entity_test/list_empty/{entity_type_id}'
|
||||
defaults:
|
||||
_content: '\Drupal\entity_test\Controller\EntityTestController::listEntitiesEmpty'
|
||||
_controller: '\Drupal\entity_test\Controller\EntityTestController::listEntitiesEmpty'
|
||||
_title: 'Empty list of entities of the given entity type, empty because no entities match the query'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ class EntityTestRoutes {
|
|||
foreach ($types as $entity_type_id) {
|
||||
$routes["entity.$entity_type_id.add_form"] = new Route(
|
||||
"$entity_type_id/add",
|
||||
array('_content' => '\Drupal\entity_test\Controller\EntityTestController::testAdd', 'entity_type_id' => $entity_type_id),
|
||||
array('_controller' => '\Drupal\entity_test\Controller\EntityTestController::testAdd', 'entity_type_id' => $entity_type_id),
|
||||
array('_permission' => 'administer entity_test content')
|
||||
);
|
||||
|
||||
$routes["entity.$entity_type_id.edit_form"] = new Route(
|
||||
"$entity_type_id/manage/{" . $entity_type_id . '}',
|
||||
array('_content' => '\Drupal\entity_test\Controller\EntityTestController::testEdit', 'entity_type_id' => $entity_type_id),
|
||||
array('_controller' => '\Drupal\entity_test\Controller\EntityTestController::testEdit', 'entity_type_id' => $entity_type_id),
|
||||
array('_permission' => 'administer entity_test content'),
|
||||
array('parameters' => array(
|
||||
$entity_type_id => array('type' => 'entity:' . $entity_type_id),
|
||||
|
|
@ -44,7 +44,7 @@ class EntityTestRoutes {
|
|||
|
||||
$routes["entity.$entity_type_id.admin_form"] = new Route(
|
||||
"$entity_type_id/structure/{bundle}",
|
||||
array('_content' => '\Drupal\entity_test\Controller\EntityTestController::testAdmin'),
|
||||
array('_controller' => '\Drupal\entity_test\Controller\EntityTestController::testAdmin'),
|
||||
array('_permission' => 'administer entity_test content')
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
error_test.generate_warnings:
|
||||
path: '/error-test/generate-warnings'
|
||||
defaults:
|
||||
_content: '\Drupal\error_test\Controller\ErrorTestController::generateWarnings'
|
||||
_controller: '\Drupal\error_test\Controller\ErrorTestController::generateWarnings'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
error_test.generate_warnings_with_report:
|
||||
path: '/error-test/generate-warnings-with-report'
|
||||
defaults:
|
||||
_content: '\Drupal\error_test\Controller\ErrorTestController::generateWarnings'
|
||||
_controller: '\Drupal\error_test\Controller\ErrorTestController::generateWarnings'
|
||||
collect_errors: TRUE
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -16,13 +16,13 @@ error_test.generate_warnings_with_report:
|
|||
error_test.trigger_exception:
|
||||
path: '/error-test/trigger-exception'
|
||||
defaults:
|
||||
_content: '\Drupal\error_test\Controller\ErrorTestController::triggerException'
|
||||
_controller: '\Drupal\error_test\Controller\ErrorTestController::triggerException'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
error_test.trigger_pdo_exception:
|
||||
path: '/error-test/trigger-pdo-exception'
|
||||
defaults:
|
||||
_content: '\Drupal\error_test\Controller\ErrorTestController::triggerPDOException'
|
||||
_controller: '\Drupal\error_test\Controller\ErrorTestController::triggerPDOException'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ form_test.form_state_database:
|
|||
form_test.two_instances:
|
||||
path: '/form-test/two-instances-of-same-form'
|
||||
defaults:
|
||||
_content: '\Drupal\form_test\Controller\FormTestController::twoFormInstances'
|
||||
_controller: '\Drupal\form_test\Controller\FormTestController::twoFormInstances'
|
||||
requirements:
|
||||
_module_dependencies: 'node'
|
||||
_permission: 'create page content'
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ menu_test.menu_name_test:
|
|||
path: '/menu_name_test'
|
||||
defaults:
|
||||
_title: 'Test menu_name router item'
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -10,14 +10,14 @@ menu_test.menu_callback_title:
|
|||
path: '/menu_callback_title'
|
||||
defaults:
|
||||
_title: 'Menu Callback Title'
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.login_callback:
|
||||
path: '/menu_login_callback'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::testLogin'
|
||||
_controller: '\Drupal\menu_test\TestControllers::testLogin'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
options:
|
||||
|
|
@ -26,7 +26,7 @@ menu_test.login_callback:
|
|||
menu_test.callback_description:
|
||||
path: '/menu_callback_description'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ menu_test.callback_description_plain:
|
|||
path: '/menu_callback_description/description-plain'
|
||||
defaults:
|
||||
_title: 'Menu item with a regular description'
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -42,161 +42,161 @@ menu_test.menu_no_title_callback:
|
|||
path: '/menu_no_title_callback'
|
||||
defaults:
|
||||
_title: 'A title with @placeholder'
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.router_test1:
|
||||
path: '/foo/{bar}'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.router_test2:
|
||||
path: '/foo/{bar}/b'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test2'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test2'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.router_test3:
|
||||
path: '/foo/{bar}/c'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test2'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test2'
|
||||
requirements:
|
||||
_access: 'FALSE'
|
||||
|
||||
menu_test.local_action1:
|
||||
path: '/menu-test-local-action'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_action2:
|
||||
path: '/menu-test-local-action/hook_menu'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test2'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test2'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_action3:
|
||||
path: '/menu-test-local-action/routing'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test2'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test2'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_action4:
|
||||
path: '/menu-test-local-action/dynamic-title'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test2'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test2'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_action5:
|
||||
path: '/menu-test-local-action/routing2'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test2'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test2'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_task_test_tasks:
|
||||
path: '/menu-local-task-test/tasks'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_task_test_tasks_tasks:
|
||||
path: '/menu-local-task-test/tasks/tasks'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_task_test_tasks_view:
|
||||
path: '/menu-local-task-test/tasks/view'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_task_test_tasks_edit:
|
||||
path: '/menu-local-task-test/tasks/edit'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_task_test_tasks_settings:
|
||||
path: '/menu-local-task-test/tasks/settings'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_task_test_tasks_settings_sub1:
|
||||
path: '/menu-local-task-test/tasks/settings/sub1'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_task_test_tasks_settings_sub2:
|
||||
path: '/menu-local-task-test/tasks/settings/sub2'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_task_test_tasks_settings_sub3:
|
||||
path: '/menu-local-task-test/tasks/settings/sub3'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_task_test_tasks_settings_derived:
|
||||
path: '/menu-local-task-test/tasks/settings/{placeholder}'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::testDerived'
|
||||
_controller: '\Drupal\menu_test\TestControllers::testDerived'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_task_test_placeholder_sub1:
|
||||
path: '/menu-local-task-test-dynamic/{placeholder}/sub1'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_task_test_placeholder_sub2:
|
||||
path: '/menu-local-task-test-dynamic/{placeholder}/sub2'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_task_test_upcasting_sub1:
|
||||
path: '/menu-local-task-test-upcasting/{entity_test}/sub1'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.local_task_test_upcasting_sub2:
|
||||
path: '/menu-local-task-test-upcasting/{entity_test}/sub2'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::test1'
|
||||
_controller: '\Drupal\menu_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.optional_placeholder:
|
||||
path: '/menu-test/optional/{placeholder}'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\TestControllers::testDefaults'
|
||||
_controller: '\Drupal\menu_test\TestControllers::testDefaults'
|
||||
placeholder: NULL
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -205,7 +205,7 @@ menu_test.menu_test_maintain:
|
|||
path: '/menu_test_maintain/{test}'
|
||||
defaults:
|
||||
_title: 'Menu maintain test'
|
||||
_content: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
_controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ menu_test.hierarchy_parent:
|
|||
path: '/menu-test/hierarchy/parent'
|
||||
defaults:
|
||||
_title: 'Parent menu router'
|
||||
_content: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
_controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -221,7 +221,7 @@ menu_test.hierarchy_parent_child:
|
|||
path: '/menu-test/hierarchy/parent/child'
|
||||
defaults:
|
||||
_title: 'Child menu router'
|
||||
_content: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
_controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -229,7 +229,7 @@ menu_test.hierarchy_parent_child2:
|
|||
path: '/menu-test/hierarchy/parent/child2/child'
|
||||
defaults:
|
||||
_title: 'Unattached subchild router'
|
||||
_content: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
_controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -237,7 +237,7 @@ menu_test.menu_test:
|
|||
path: '/menu-test'
|
||||
defaults:
|
||||
_title: 'Menu test root'
|
||||
_content: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
_controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ menu_test.hidden:
|
|||
path: '/menu-test/hidden'
|
||||
defaults:
|
||||
_title: 'Hidden test root'
|
||||
_content: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
_controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -253,14 +253,14 @@ menu_test.hidden_menu:
|
|||
path: '/menu-test/hidden/menu'
|
||||
defaults:
|
||||
_title: 'Menus'
|
||||
_content: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
_controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
menu_test.hidden_block:
|
||||
path: '/menu-test/hidden/block'
|
||||
defaults:
|
||||
_title: 'Blocks'
|
||||
_content: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
_controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -268,7 +268,7 @@ menu_test.hidden_block_add:
|
|||
path: '/menu-test/hidden/block/add'
|
||||
defaults:
|
||||
_title: 'Add block'
|
||||
_content: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
_controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -276,7 +276,7 @@ menu_test.hidden_block_configure:
|
|||
path: '/menu-test/hidden/block/manage/{foo}/{bar}'
|
||||
defaults:
|
||||
_title: 'Configure block'
|
||||
_content: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
_controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -284,7 +284,7 @@ menu_test.hidden_block_delete:
|
|||
path: '/menu-test/hidden/block/manage/{foo}/{bar}/delete'
|
||||
defaults:
|
||||
_title: 'Configure block'
|
||||
_content: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
_controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ menu_test.theme_callback:
|
|||
path: '/menu-test/theme-callback/{inherited}'
|
||||
defaults:
|
||||
_title: 'Page that displays different themes'
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::themePage'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::themePage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -300,7 +300,7 @@ menu_test.no_theme_callback:
|
|||
path: '/menu-test/no-theme-callback'
|
||||
defaults:
|
||||
_title: 'Page that displays different themes without using a theme negotiation.'
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::themePage'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::themePage'
|
||||
inherited: false
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -312,7 +312,7 @@ menu_test.exotic_path:
|
|||
#path: "/menu-test/ -._~!$'\"()*@[]?&+%#,;=:%23%25%26%2B%2F%3Féøïвβ中國書۞"
|
||||
path: '/menu-test/{exotic}'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
requirements:
|
||||
exotic: '.+'
|
||||
_access: 'TRUE'
|
||||
|
|
@ -321,7 +321,7 @@ menu_test.theme_callback_inheritance:
|
|||
path: '/menu-test/theme-callback/{inherited}/inheritance'
|
||||
defaults:
|
||||
_title: 'Page that tests theme negotiation inheritance.'
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::themePage'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::themePage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -329,7 +329,7 @@ menu_test.title_test_case1:
|
|||
path: '/menu-title-test/case1'
|
||||
defaults:
|
||||
_title: 'Example title - Case 1'
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -338,7 +338,7 @@ menu_test.title_test_case2:
|
|||
defaults:
|
||||
_title: 'Example title'
|
||||
_title_callback: '\Drupal\menu_test\Controller\MenuTestController::titleCallback'
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -350,28 +350,28 @@ menu_test.title_test_case3:
|
|||
_title_arguments:
|
||||
title: 'Example title'
|
||||
case_number: '3'
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.context:
|
||||
path: '/menu-test/context'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.custom:
|
||||
path: '/menu-test/custom'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
menu_test.breadcrumb1:
|
||||
path: '/menu-test/breadcrumb1'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_title: '<script>alert(12);</script>'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -379,7 +379,7 @@ menu_test.breadcrumb1:
|
|||
menu_test.breadcrumb2:
|
||||
path: '/menu-test/breadcrumb1/breadcrumb2'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_title_callback: '\Drupal\menu_test\Controller\MenuTestController::breadcrumbTitleCallback'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -387,7 +387,7 @@ menu_test.breadcrumb2:
|
|||
menu_test.breadcrumb3:
|
||||
path: '/menu-test/breadcrumb1/breadcrumb2/breadcrumb3'
|
||||
defaults:
|
||||
_content: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback'
|
||||
_title: 'Normal title'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ module_test.dynamic_invoke:
|
|||
path: '/module-test/hook-dynamic-loading-invoke'
|
||||
defaults:
|
||||
_title: 'Test hook dynamic loading (invoke)'
|
||||
_content: '\Drupal\module_test\Controller\ModuleTestController::hookDynamicLoadingInvoke'
|
||||
_controller: '\Drupal\module_test\Controller\ModuleTestController::hookDynamicLoadingInvoke'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ module_test.dynamic_invoke_all:
|
|||
path: '/module-test/hook-dynamic-loading-invoke-all'
|
||||
defaults:
|
||||
_title: 'Test hook dynamic loading (invoke_all)'
|
||||
_content: '\Drupal\module_test\Controller\ModuleTestController::hookDynamicLoadingInvokeAll'
|
||||
_controller: '\Drupal\module_test\Controller\ModuleTestController::hookDynamicLoadingInvokeAll'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -18,6 +18,6 @@ module_test.class_loading:
|
|||
path: '/module-test/class-loading'
|
||||
defaults:
|
||||
_title: 'Test loading a class from another module'
|
||||
_content: '\Drupal\module_test\Controller\ModuleTestController::testClassLoading'
|
||||
_controller: '\Drupal\module_test\Controller\ModuleTestController::testClassLoading'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
paramconverter_test.user_node_foo:
|
||||
path: '/paramconverter_test/test_user_node_foo/{user}/{node}/{foo}'
|
||||
defaults:
|
||||
_content: '\Drupal\paramconverter_test\TestControllers::testUserNodeFoo'
|
||||
_controller: '\Drupal\paramconverter_test\TestControllers::testUserNodeFoo'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
paramconverter_test.node_user_user:
|
||||
path: '/paramconverter_test/test_node_user_user/{node}/{foo}/{user}'
|
||||
defaults:
|
||||
_content: '\Drupal\paramconverter_test\TestControllers::testUserNodeFoo'
|
||||
_controller: '\Drupal\paramconverter_test\TestControllers::testUserNodeFoo'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
options:
|
||||
|
|
@ -19,7 +19,7 @@ paramconverter_test.node_user_user:
|
|||
paramconverter_test.node_node_foo:
|
||||
path: '/paramconverter_test/test_node_node_foo/{user}/{node}/{foo}'
|
||||
defaults:
|
||||
_content: '\Drupal\paramconverter_test\TestControllers::testUserNodeFoo'
|
||||
_controller: '\Drupal\paramconverter_test\TestControllers::testUserNodeFoo'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
options:
|
||||
|
|
@ -32,7 +32,7 @@ paramconverter_test.node_set_parent:
|
|||
requirements:
|
||||
_access: 'TRUE'
|
||||
defaults:
|
||||
_content: '\Drupal\paramconverter_test\TestControllers::testNodeSetParent'
|
||||
_controller: '\Drupal\paramconverter_test\TestControllers::testNodeSetParent'
|
||||
options:
|
||||
parameters:
|
||||
parent:
|
||||
|
|
@ -43,4 +43,4 @@ paramconverter_test.node_check_language:
|
|||
requirements:
|
||||
_access: 'TRUE'
|
||||
defaults:
|
||||
_content: '\Drupal\paramconverter_test\TestControllers::testEntityLanguage'
|
||||
_controller: '\Drupal\paramconverter_test\TestControllers::testEntityLanguage'
|
||||
|
|
|
|||
|
|
@ -8,21 +8,21 @@ router_test.1:
|
|||
router_test.2:
|
||||
path: '/router_test/test2'
|
||||
defaults:
|
||||
_content: '\Drupal\router_test\TestControllers::test2'
|
||||
_controller: '\Drupal\router_test\TestControllers::test2'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
router_test.3:
|
||||
path: '/router_test/test3/{value}'
|
||||
defaults:
|
||||
_content: '\Drupal\router_test\TestControllers::test3'
|
||||
_controller: '\Drupal\router_test\TestControllers::test3'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
router_test.4:
|
||||
path: '/router_test/test4/{value}'
|
||||
defaults:
|
||||
_content: '\Drupal\router_test\TestControllers::test4'
|
||||
_controller: '\Drupal\router_test\TestControllers::test4'
|
||||
value: 'narf'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -30,7 +30,7 @@ router_test.4:
|
|||
router_test.6:
|
||||
path: '/router_test/test6'
|
||||
defaults:
|
||||
_content: '\Drupal\router_test\TestControllers::test1'
|
||||
_controller: '\Drupal\router_test\TestControllers::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ router_test.9:
|
|||
router_test.10:
|
||||
path: '/router_test/test10'
|
||||
defaults:
|
||||
_content: '\Drupal\router_test\TestContent::test1'
|
||||
_controller: '\Drupal\router_test\TestContent::test1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -70,21 +70,21 @@ router_test.11:
|
|||
requirements:
|
||||
_user_is_logged_in: 'TRUE'
|
||||
defaults:
|
||||
_content: '\Drupal\router_test\TestContent::test11'
|
||||
_controller: '\Drupal\router_test\TestContent::test11'
|
||||
|
||||
router_test.12:
|
||||
path: '/router_test/test12/{user}'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
defaults:
|
||||
_content: '\Drupal\router_test\TestContent::subrequestTest'
|
||||
_controller: '\Drupal\router_test\TestContent::subrequestTest'
|
||||
|
||||
router_test.13:
|
||||
path: '/router_test/test13/{user}'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
defaults:
|
||||
_content: '\Drupal\router_test\TestContent::testAccount'
|
||||
_controller: '\Drupal\router_test\TestContent::testAccount'
|
||||
|
||||
router_test.14:
|
||||
path: '/router_test/test14/{uid}'
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class RouteTestSubscriber extends RouteSubscriberBase {
|
|||
protected function alterRoutes(RouteCollection $collection) {
|
||||
$route = $collection->get('router_test.6');
|
||||
// Change controller method from test1 to test5.
|
||||
$route->setDefault('_content', '\Drupal\router_test\TestControllers::test5');
|
||||
$route->setDefault('_controller', '\Drupal\router_test\TestControllers::test5');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ session_test.get:
|
|||
path: '/session-test/get'
|
||||
defaults:
|
||||
_title: 'Session value'
|
||||
_content: '\Drupal\session_test\Controller\SessionTestController::get'
|
||||
_controller: '\Drupal\session_test\Controller\SessionTestController::get'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ session_test.id:
|
|||
path: '/session-test/id'
|
||||
defaults:
|
||||
_title: 'Session ID'
|
||||
_content: '\Drupal\session_test\Controller\SessionTestController::getId'
|
||||
_controller: '\Drupal\session_test\Controller\SessionTestController::getId'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ session_test.id_from_cookie:
|
|||
path: '/session-test/id-from-cookie'
|
||||
defaults:
|
||||
_title: 'Session ID from cookie'
|
||||
_content: '\Drupal\session_test\Controller\SessionTestController::getIdFromCookie'
|
||||
_controller: '\Drupal\session_test\Controller\SessionTestController::getIdFromCookie'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ session_test.set:
|
|||
path: '/session-test/set/{test_value}'
|
||||
defaults:
|
||||
_title: 'Set session value'
|
||||
_content: '\Drupal\session_test\Controller\SessionTestController::set'
|
||||
_controller: '\Drupal\session_test\Controller\SessionTestController::set'
|
||||
options:
|
||||
converters:
|
||||
test_value: '\s+'
|
||||
|
|
@ -37,7 +37,7 @@ session_test.no_set:
|
|||
path: '/session-test/no-set/{test_value}'
|
||||
defaults:
|
||||
_title: 'Set session value but do not save session'
|
||||
_content: '\Drupal\session_test\Controller\SessionTestController::noSet'
|
||||
_controller: '\Drupal\session_test\Controller\SessionTestController::noSet'
|
||||
options:
|
||||
converters:
|
||||
test_value: '\s+'
|
||||
|
|
@ -48,7 +48,7 @@ session_test.set_message:
|
|||
path: '/session-test/set-message'
|
||||
defaults:
|
||||
_title: 'Set message'
|
||||
_content: '\Drupal\session_test\Controller\SessionTestController::setMessage'
|
||||
_controller: '\Drupal\session_test\Controller\SessionTestController::setMessage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ session_test.set_message_but_dont_save:
|
|||
path: '/session-test/set-message-but-dont-save'
|
||||
defaults:
|
||||
_title: 'Set message but do not save session'
|
||||
_content: '\Drupal\session_test\Controller\SessionTestController::setMessageButDontSave'
|
||||
_controller: '\Drupal\session_test\Controller\SessionTestController::setMessageButDontSave'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ session_test.is_logged_in:
|
|||
path: '/session-test/is-logged-in'
|
||||
defaults:
|
||||
_title: 'Check if user is logged in'
|
||||
_content: '\Drupal\session_test\Controller\SessionTestController::isLoggedIn'
|
||||
_controller: '\Drupal\session_test\Controller\SessionTestController::isLoggedIn'
|
||||
requirements:
|
||||
_user_is_logged_in: 'TRUE'
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ system_test.main_content_handling:
|
|||
path: '/system-test/main-content-handling'
|
||||
defaults:
|
||||
_title: 'Test main content handling'
|
||||
_content: '\Drupal\system_test\Controller\SystemTestController::mainContentFallback'
|
||||
_controller: '\Drupal\system_test\Controller\SystemTestController::mainContentFallback'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ system_test.drupal_set_message:
|
|||
path: '/system-test/drupal-set-message'
|
||||
defaults:
|
||||
_title: 'Set messages with drupal_set_message()'
|
||||
_content: '\Drupal\system_test\Controller\SystemTestController::drupalSetMessageTest'
|
||||
_controller: '\Drupal\system_test\Controller\SystemTestController::drupalSetMessageTest'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ system_test.main_content_fallback:
|
|||
path: '/system-test/main-content-fallback'
|
||||
defaults:
|
||||
_title: 'Test main content fallback'
|
||||
_content: '\Drupal\system_test\Controller\SystemTestController::mainContentFallback'
|
||||
_controller: '\Drupal\system_test\Controller\SystemTestController::mainContentFallback'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ system_test.lock_acquire:
|
|||
path: '/system-test/lock-acquire'
|
||||
defaults:
|
||||
_title: 'Lock acquire'
|
||||
_content: '\Drupal\system_test\Controller\SystemTestController::lockAcquire'
|
||||
_controller: '\Drupal\system_test\Controller\SystemTestController::lockAcquire'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ system_test.lock_exit:
|
|||
path: '/system-test/lock-exit'
|
||||
defaults:
|
||||
_title: 'Lock acquire then exit'
|
||||
_content: '\Drupal\system_test\Controller\SystemTestController::lockExit'
|
||||
_controller: '\Drupal\system_test\Controller\SystemTestController::lockExit'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -49,14 +49,14 @@ system_test.lock_persist:
|
|||
path: '/system-test/lock-persist/{lock_name}'
|
||||
defaults:
|
||||
_title: 'Persistent lock acquire'
|
||||
_content: '\Drupal\system_test\Controller\SystemTestController::lockPersist'
|
||||
_controller: '\Drupal\system_test\Controller\SystemTestController::lockPersist'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
system_test.cache_tags_page:
|
||||
path: '/system-test/cache_tags_page'
|
||||
defaults:
|
||||
_content: '\Drupal\system_test\Controller\SystemTestController::system_test_cache_tags_page'
|
||||
_controller: '\Drupal\system_test\Controller\SystemTestController::system_test_cache_tags_page'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -70,14 +70,14 @@ system_test.authorize_init:
|
|||
system_test.set_header:
|
||||
path: '/system-test/set-header'
|
||||
defaults:
|
||||
_content: '\Drupal\system_test\Controller\SystemTestController::setHeader'
|
||||
_controller: '\Drupal\system_test\Controller\SystemTestController::setHeader'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
system_test.shutdown_functions:
|
||||
path: '/system-test/shutdown-functions/{arg1}/{arg2}'
|
||||
defaults:
|
||||
_content: '\Drupal\system_test\Controller\SystemTestController::shutdownFunctions'
|
||||
_controller: '\Drupal\system_test\Controller\SystemTestController::shutdownFunctions'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
|
|||
|
|
@ -2,21 +2,21 @@ test_page_test.test_page:
|
|||
path: '/test-page'
|
||||
defaults:
|
||||
_title: 'Test front page'
|
||||
_content: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
_controller: '\Drupal\test_page_test\Controller\TestPageTestController::testPage'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
test_page_test.render_title:
|
||||
path: '/test-render-title'
|
||||
defaults:
|
||||
_content: '\Drupal\test_page_test\Controller\Test::renderTitle'
|
||||
_controller: '\Drupal\test_page_test\Controller\Test::renderTitle'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
test_page_test.static_title:
|
||||
path: '/test-page-static-title'
|
||||
defaults:
|
||||
_content: '\Drupal\test_page_test\Controller\Test::staticTitle'
|
||||
_controller: '\Drupal\test_page_test\Controller\Test::staticTitle'
|
||||
_title: 'Static title'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -24,7 +24,7 @@ test_page_test.static_title:
|
|||
test_page_test.dynamic_title:
|
||||
path: '/test-page-dynamic-title'
|
||||
defaults:
|
||||
_content: '\Drupal\test_page_test\Controller\Test::staticTitle'
|
||||
_controller: '\Drupal\test_page_test\Controller\Test::staticTitle'
|
||||
_title_callback: 'Drupal\test_page_test\Controller\Test::dynamicTitle'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -32,6 +32,6 @@ test_page_test.dynamic_title:
|
|||
test_page_test.admin_render_title:
|
||||
path: '/admin/test-render-title'
|
||||
defaults:
|
||||
_content: '\Drupal\test_page_test\Controller\Test::renderTitle'
|
||||
_controller: '\Drupal\test_page_test\Controller\Test::renderTitle'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -3,28 +3,28 @@ theme_test.function_template_override:
|
|||
options:
|
||||
_custom_theme: 'test_theme'
|
||||
defaults:
|
||||
_content: '\Drupal\theme_test\ThemeTestController::functionTemplateOverridden'
|
||||
_controller: '\Drupal\theme_test\ThemeTestController::functionTemplateOverridden'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
theme_test.info_stylesheets:
|
||||
path: '/theme-test/info/stylesheets'
|
||||
defaults:
|
||||
_content: '\Drupal\theme_test\ThemeTestController::testInfoStylesheets'
|
||||
_controller: '\Drupal\theme_test\ThemeTestController::testInfoStylesheets'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
theme_test.template_test:
|
||||
path: '/theme-test/template-test'
|
||||
defaults:
|
||||
_content: '\Drupal\theme_test\ThemeTestController::testTemplate'
|
||||
_controller: '\Drupal\theme_test\ThemeTestController::testTemplate'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
theme_test.inline_template_test:
|
||||
path: '/theme-test/inline-template-test'
|
||||
defaults:
|
||||
_content: '\Drupal\theme_test\ThemeTestController::testInlineTemplate'
|
||||
_controller: '\Drupal\theme_test\ThemeTestController::testInlineTemplate'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ theme_test.suggestion:
|
|||
options:
|
||||
_custom_theme: 'test_theme'
|
||||
defaults:
|
||||
_content: '\Drupal\theme_test\ThemeTestController::testSuggestion'
|
||||
_controller: '\Drupal\theme_test\ThemeTestController::testSuggestion'
|
||||
_title: 'Suggestion'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -43,7 +43,7 @@ theme_test.priority:
|
|||
options:
|
||||
_custom_theme: 'test_theme'
|
||||
defaults:
|
||||
_content: '\Drupal\theme_test\ThemeTestController::testSuggestion'
|
||||
_controller: '\Drupal\theme_test\ThemeTestController::testSuggestion'
|
||||
_title: 'Suggestion'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
@ -51,49 +51,49 @@ theme_test.priority:
|
|||
theme_test.request_listener:
|
||||
path: '/theme-test/request-listener'
|
||||
defaults:
|
||||
_content: '\Drupal\theme_test\ThemeTestController::testRequestListener'
|
||||
_controller: '\Drupal\theme_test\ThemeTestController::testRequestListener'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
suggestion_alter:
|
||||
path: '/theme-test/suggestion-alter'
|
||||
defaults:
|
||||
_content: '\Drupal\theme_test\ThemeTestController::suggestionAlter'
|
||||
_controller: '\Drupal\theme_test\ThemeTestController::suggestionAlter'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
theme_test.general_suggestion_alter:
|
||||
path: '/theme-test/general-suggestion-alter'
|
||||
defaults:
|
||||
_content: '\Drupal\theme_test\ThemeTestController::generalSuggestionAlter'
|
||||
_controller: '\Drupal\theme_test\ThemeTestController::generalSuggestionAlter'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
suggestion_provided:
|
||||
path: '/theme-test/suggestion-provided'
|
||||
defaults:
|
||||
_content: '\Drupal\theme_test\ThemeTestController::suggestionProvided'
|
||||
_controller: '\Drupal\theme_test\ThemeTestController::suggestionProvided'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
specific_suggestion_alter:
|
||||
path: '/theme-test/specific-suggestion-alter'
|
||||
defaults:
|
||||
_content: '\Drupal\theme_test\ThemeTestController::specificSuggestionAlter'
|
||||
_controller: '\Drupal\theme_test\ThemeTestController::specificSuggestionAlter'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
function_suggestion_alter:
|
||||
path: '/theme-test/function-suggestion-alter'
|
||||
defaults:
|
||||
_content: '\Drupal\theme_test\ThemeTestController::functionSuggestionAlter'
|
||||
_controller: '\Drupal\theme_test\ThemeTestController::functionSuggestionAlter'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
suggestion_alter_include:
|
||||
path: '/theme-test/suggestion-alter-include'
|
||||
defaults:
|
||||
_content: '\Drupal\theme_test\ThemeTestController::suggestionAlterInclude'
|
||||
_controller: '\Drupal\theme_test\ThemeTestController::suggestionAlterInclude'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
twig_extension_test.filter:
|
||||
path: '/twig-extension-test/filter'
|
||||
defaults:
|
||||
_content: '\Drupal\twig_extension_test\TwigExtensionTestController::testFilterRender'
|
||||
_controller: '\Drupal\twig_extension_test\TwigExtensionTestController::testFilterRender'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
twig_extension_test.function:
|
||||
path: '/twig-extension-test/function'
|
||||
defaults:
|
||||
_content: '\Drupal\twig_extension_test\TwigExtensionTestController::testFunctionRender'
|
||||
_controller: '\Drupal\twig_extension_test\TwigExtensionTestController::testFunctionRender'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
twig_theme_test.php_variables:
|
||||
path: '/twig-theme-test/php-variables'
|
||||
defaults:
|
||||
_content: '\Drupal\twig_theme_test\TwigThemeTestController::phpVariablesRender'
|
||||
_controller: '\Drupal\twig_theme_test\TwigThemeTestController::phpVariablesRender'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
twig_theme_test.trans:
|
||||
path: '/twig-theme-test/trans'
|
||||
defaults:
|
||||
_content: '\Drupal\twig_theme_test\TwigThemeTestController::transBlockRender'
|
||||
_controller: '\Drupal\twig_theme_test\TwigThemeTestController::transBlockRender'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
twig_theme_test_url_generator:
|
||||
path: '/twig-theme-test/url-generator'
|
||||
defaults:
|
||||
_content: '\Drupal\twig_theme_test\TwigThemeTestController::urlGeneratorRender'
|
||||
_controller: '\Drupal\twig_theme_test\TwigThemeTestController::urlGeneratorRender'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
twig_theme_test_link_generator:
|
||||
path: '/twig-theme-test/link-generator'
|
||||
defaults:
|
||||
_content: '\Drupal\twig_theme_test\TwigThemeTestController::linkGeneratorRender'
|
||||
_controller: '\Drupal\twig_theme_test\TwigThemeTestController::linkGeneratorRender'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
url_alter_test.foo:
|
||||
path: '/url-alter-test/foo'
|
||||
defaults:
|
||||
_content: '\Drupal\url_alter_test\Controller\URLAlterTestController::foo'
|
||||
_controller: '\Drupal\url_alter_test\Controller\URLAlterTestController::foo'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ taxonomy.vocabulary_list:
|
|||
entity.taxonomy_term.add_form:
|
||||
path: '/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/add'
|
||||
defaults:
|
||||
_content: '\Drupal\taxonomy\Controller\TaxonomyController::addForm'
|
||||
_controller: '\Drupal\taxonomy\Controller\TaxonomyController::addForm'
|
||||
_title: 'Add term'
|
||||
requirements:
|
||||
_entity_create_access: 'taxonomy_term:{taxonomy_vocabulary}'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
tour_test.1:
|
||||
path: '/tour-test-1'
|
||||
defaults:
|
||||
_content: '\Drupal\tour_test\Controller\TourTestController::tourTest1'
|
||||
_controller: '\Drupal\tour_test\Controller\TourTestController::tourTest1'
|
||||
options:
|
||||
_admin_route: TRUE
|
||||
requirements:
|
||||
|
|
@ -10,14 +10,14 @@ tour_test.1:
|
|||
tour_test.1_action:
|
||||
path: '/tour-test-1/action'
|
||||
defaults:
|
||||
_content: '\Drupal\tour_test\Controller\TourTestController::tourTest1'
|
||||
_controller: '\Drupal\tour_test\Controller\TourTestController::tourTest1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
tour_test.2:
|
||||
path: '/tour-test-2/subpath'
|
||||
defaults:
|
||||
_content: '\Drupal\tour_test\Controller\TourTestController::tourTest2'
|
||||
_controller: '\Drupal\tour_test\Controller\TourTestController::tourTest2'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ tour_test.3:
|
|||
path: '/tour-test-3/{locale}'
|
||||
defaults:
|
||||
locale: 'foo'
|
||||
_content: '\Drupal\tour_test\Controller\TourTestController::tourTest1'
|
||||
_controller: '\Drupal\tour_test\Controller\TourTestController::tourTest1'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
tracker.page:
|
||||
path: '/activity'
|
||||
defaults:
|
||||
_content: '\Drupal\tracker\Controller\TrackerPage::getContent'
|
||||
_controller: '\Drupal\tracker\Controller\TrackerPage::getContent'
|
||||
_title: 'Recent content'
|
||||
requirements:
|
||||
_permission: 'access content'
|
||||
|
|
@ -9,7 +9,7 @@ tracker.page:
|
|||
tracker.users_recent_content:
|
||||
path: '/activity/{user}'
|
||||
defaults:
|
||||
_content: '\Drupal\tracker\Controller\TrackerUserRecent::getContent'
|
||||
_controller: '\Drupal\tracker\Controller\TrackerUserRecent::getContent'
|
||||
_title: 'My recent content'
|
||||
options:
|
||||
_access_mode: 'ALL'
|
||||
|
|
@ -20,7 +20,7 @@ tracker.users_recent_content:
|
|||
tracker.user_tab:
|
||||
path: '/user/{user}/activity'
|
||||
defaults:
|
||||
_content: '\Drupal\tracker\Controller\TrackerUserTab::getContent'
|
||||
_controller: '\Drupal\tracker\Controller\TrackerUserTab::getContent'
|
||||
_title_callback: '\Drupal\tracker\Controller\TrackerUserTab::getTitle'
|
||||
options:
|
||||
_access_mode: 'ALL'
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ update.settings:
|
|||
update.status:
|
||||
path: '/admin/reports/updates'
|
||||
defaults:
|
||||
_content: '\Drupal\update\Controller\UpdateController::updateStatus'
|
||||
_controller: '\Drupal\update\Controller\UpdateController::updateStatus'
|
||||
_title: 'Available updates'
|
||||
requirements:
|
||||
_permission: 'administer site configuration'
|
||||
|
|
@ -18,7 +18,7 @@ update.manual_status:
|
|||
path: '/admin/reports/updates/check'
|
||||
defaults:
|
||||
_title: 'Manual update check'
|
||||
_content: '\Drupal\update\Controller\UpdateController::updateStatusManually'
|
||||
_controller: '\Drupal\update\Controller\UpdateController::updateStatusManually'
|
||||
requirements:
|
||||
_permission: 'administer site configuration'
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ user.autocomplete_anonymous:
|
|||
user.admin_index:
|
||||
path: '/admin/config/people'
|
||||
defaults:
|
||||
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
|
||||
_title: 'People'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
|
|
@ -128,7 +128,7 @@ user.pass:
|
|||
user.page:
|
||||
path: '/user'
|
||||
defaults:
|
||||
_content: '\Drupal\user\Controller\UserController::userPage'
|
||||
_controller: '\Drupal\user\Controller\UserController::userPage'
|
||||
_title: 'My account'
|
||||
requirements:
|
||||
_user_is_logged_in: 'TRUE'
|
||||
|
|
@ -175,7 +175,7 @@ user.cancel_confirm:
|
|||
path: '/user/{user}/cancel/confirm/{timestamp}/{hashed_pass}'
|
||||
defaults:
|
||||
_title: 'Confirm account cancellation'
|
||||
_content: '\Drupal\user\Controller\UserController::confirmCancel'
|
||||
_controller: '\Drupal\user\Controller\UserController::confirmCancel'
|
||||
timestamp: 0
|
||||
hashed_pass: ''
|
||||
requirements:
|
||||
|
|
@ -184,7 +184,7 @@ user.cancel_confirm:
|
|||
user.reset:
|
||||
path: '/user/reset/{uid}/{timestamp}/{hash}'
|
||||
defaults:
|
||||
_content: '\Drupal\user\Controller\UserController::resetPass'
|
||||
_controller: '\Drupal\user\Controller\UserController::resetPass'
|
||||
_title: 'Reset password'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
|
|||
|
|
@ -66,22 +66,6 @@ class Page extends PathPluginBase {
|
|||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getRoute($view_id, $display_id) {
|
||||
$route = parent::getRoute($view_id, $display_id);
|
||||
|
||||
// Move _controller to _content for page displays, which will return a
|
||||
// normal Drupal HTML page.
|
||||
$defaults = $route->getDefaults();
|
||||
$defaults['_content'] = $defaults['_controller'];
|
||||
unset($defaults['_controller']);
|
||||
$route->setDefaults($defaults);
|
||||
|
||||
return $route;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides \Drupal\views\Plugin\views\display\PathPluginBase::execute().
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ class RouteSubscriberTest extends UnitTestCase {
|
|||
$display_1->expects($this->once())
|
||||
->method('collectRoutes')
|
||||
->willReturnCallback(function() use ($collection) {
|
||||
$collection->add('views.test_id.page_1', new Route('test_route', ['_content' => 'Drupal\views\Routing\ViewPageController']));
|
||||
$collection->add('views.test_id.page_1', new Route('test_route', ['_controller' => 'Drupal\views\Routing\ViewPageController']));
|
||||
return ['test_id.page_1' => 'views.test_id.page_1'];
|
||||
});
|
||||
$display_1->expects($this->once())
|
||||
|
|
@ -112,7 +112,7 @@ class RouteSubscriberTest extends UnitTestCase {
|
|||
$display_2->expects($this->once())
|
||||
->method('collectRoutes')
|
||||
->willReturnCallback(function() use ($collection) {
|
||||
$collection->add('views.test_id.page_2', new Route('test_route', ['_content' => 'Drupal\views\Routing\ViewPageController']));
|
||||
$collection->add('views.test_id.page_2', new Route('test_route', ['_controller' => 'Drupal\views\Routing\ViewPageController']));
|
||||
return ['test_id.page_2' => 'views.test_id.page_2'];
|
||||
});
|
||||
$display_2->expects($this->once())
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ views_ui.settings_advanced:
|
|||
views_ui.reports_fields:
|
||||
path: '/admin/reports/fields/views-fields'
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Controller\ViewsUIController::reportFields'
|
||||
_controller: '\Drupal\views_ui\Controller\ViewsUIController::reportFields'
|
||||
_title: 'Used in views'
|
||||
requirements:
|
||||
_permission: 'administer views'
|
||||
|
|
@ -41,7 +41,7 @@ views_ui.reports_fields:
|
|||
views_ui.reports_plugins:
|
||||
path: '/admin/reports/views-plugins'
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Controller\ViewsUIController::reportPlugins'
|
||||
_controller: '\Drupal\views_ui\Controller\ViewsUIController::reportPlugins'
|
||||
_title: 'Views plugins'
|
||||
requirements:
|
||||
_permission: 'administer views'
|
||||
|
|
@ -95,7 +95,7 @@ entity.view.edit_form:
|
|||
tempstore: TRUE
|
||||
type: entity:view
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Controller\ViewsUIController::edit'
|
||||
_controller: '\Drupal\views_ui\Controller\ViewsUIController::edit'
|
||||
requirements:
|
||||
_entity_access: view.update
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ entity.view.edit_display_form:
|
|||
tempstore: TRUE
|
||||
type: entity:view
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Controller\ViewsUIController::edit'
|
||||
_controller: '\Drupal\views_ui\Controller\ViewsUIController::edit'
|
||||
display_id: NULL
|
||||
requirements:
|
||||
_entity_access: view.update
|
||||
|
|
@ -141,7 +141,7 @@ views_ui.form_add_handler:
|
|||
tempstore: TRUE
|
||||
type: entity:view
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Form\Ajax\AddHandler::getForm'
|
||||
_controller: '\Drupal\views_ui\Form\Ajax\AddHandler::getForm'
|
||||
requirements:
|
||||
_entity_access: view.update
|
||||
js: 'nojs|ajax'
|
||||
|
|
@ -154,7 +154,7 @@ views_ui.form_edit_details:
|
|||
tempstore: TRUE
|
||||
type: entity:view
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Form\Ajax\EditDetails::getForm'
|
||||
_controller: '\Drupal\views_ui\Form\Ajax\EditDetails::getForm'
|
||||
requirements:
|
||||
_entity_access: view.update
|
||||
js: 'nojs|ajax'
|
||||
|
|
@ -167,7 +167,7 @@ views_ui.form_reorder_displays:
|
|||
tempstore: TRUE
|
||||
type: entity:view
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Form\Ajax\ReorderDisplays::getForm'
|
||||
_controller: '\Drupal\views_ui\Form\Ajax\ReorderDisplays::getForm'
|
||||
requirements:
|
||||
_entity_access: view.update
|
||||
js: 'nojs|ajax'
|
||||
|
|
@ -180,7 +180,7 @@ views_ui.form_analyze:
|
|||
tempstore: TRUE
|
||||
type: entity:view
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Form\Ajax\Analyze::getForm'
|
||||
_controller: '\Drupal\views_ui\Form\Ajax\Analyze::getForm'
|
||||
requirements:
|
||||
_entity_access: view.update
|
||||
js: 'nojs|ajax'
|
||||
|
|
@ -193,7 +193,7 @@ views_ui.form_rearrange:
|
|||
tempstore: TRUE
|
||||
type: entity:view
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Form\Ajax\Rearrange::getForm'
|
||||
_controller: '\Drupal\views_ui\Form\Ajax\Rearrange::getForm'
|
||||
requirements:
|
||||
_entity_access: view.update
|
||||
js: 'nojs|ajax'
|
||||
|
|
@ -206,7 +206,7 @@ views_ui.form_rearrange_filter:
|
|||
tempstore: TRUE
|
||||
type: entity:view
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Form\Ajax\RearrangeFilter::getForm'
|
||||
_controller: '\Drupal\views_ui\Form\Ajax\RearrangeFilter::getForm'
|
||||
requirements:
|
||||
_entity_access: view.update
|
||||
js: 'nojs|ajax'
|
||||
|
|
@ -219,7 +219,7 @@ views_ui.form_display:
|
|||
tempstore: TRUE
|
||||
type: entity:view
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Form\Ajax\Display::getForm'
|
||||
_controller: '\Drupal\views_ui\Form\Ajax\Display::getForm'
|
||||
requirements:
|
||||
_entity_access: view.update
|
||||
js: 'nojs|ajax'
|
||||
|
|
@ -232,7 +232,7 @@ views_ui.form_handler:
|
|||
tempstore: TRUE
|
||||
type: entity:view
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Form\Ajax\ConfigHandler::getForm'
|
||||
_controller: '\Drupal\views_ui\Form\Ajax\ConfigHandler::getForm'
|
||||
requirements:
|
||||
_entity_access: view.update
|
||||
js: 'nojs|ajax'
|
||||
|
|
@ -245,7 +245,7 @@ views_ui.form_handler_extra:
|
|||
tempstore: TRUE
|
||||
type: entity:view
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Form\Ajax\ConfigHandlerExtra::getForm'
|
||||
_controller: '\Drupal\views_ui\Form\Ajax\ConfigHandlerExtra::getForm'
|
||||
requirements:
|
||||
_entity_access: view.update
|
||||
js: 'nojs|ajax'
|
||||
|
|
@ -258,7 +258,7 @@ views_ui.form_handler_group:
|
|||
tempstore: TRUE
|
||||
type: entity:view
|
||||
defaults:
|
||||
_content: '\Drupal\views_ui\Form\Ajax\ConfigHandlerGroup::getForm'
|
||||
_controller: '\Drupal\views_ui\Form\Ajax\ConfigHandlerGroup::getForm'
|
||||
form_state: NULL
|
||||
requirements:
|
||||
_entity_access: view.update
|
||||
|
|
|
|||
|
|
@ -36,24 +36,22 @@ class EntityRouteEnhancerTest extends UnitTestCase {
|
|||
$defaults['_controller'] = 'Drupal\Tests\Core\Controller\TestController::content';
|
||||
$defaults['_entity_form'] = 'entity_test.default';
|
||||
$new_defaults = $route_enhancer->enhance($defaults, $request);
|
||||
$this->assertTrue(is_callable($new_defaults['_content']));
|
||||
$this->assertInstanceOf('\Drupal\Core\Entity\HtmlEntityFormController', $new_defaults['_content'][0]);
|
||||
$this->assertEquals($new_defaults['_content'][1], 'getContentResult');
|
||||
$this->assertEquals($defaults['_controller'], $new_defaults['_controller'], '_controller got overridden.');
|
||||
$this->assertTrue(is_callable($new_defaults['_controller']));
|
||||
$this->assertEquals($defaults['_controller'], $new_defaults['_controller'], '_controller did not get overridden.');
|
||||
|
||||
// Set _entity_form and ensure that the form is set.
|
||||
$defaults = array();
|
||||
$defaults['_entity_form'] = 'entity_test.default';
|
||||
$new_defaults = $route_enhancer->enhance($defaults, $request);
|
||||
$this->assertTrue(is_callable($new_defaults['_content']));
|
||||
$this->assertInstanceOf('\Drupal\Core\Entity\HtmlEntityFormController', $new_defaults['_content'][0]);
|
||||
$this->assertEquals($new_defaults['_content'][1], 'getContentResult');
|
||||
$this->assertTrue(is_callable($new_defaults['_controller']));
|
||||
$this->assertInstanceOf('\Drupal\Core\Entity\HtmlEntityFormController', $new_defaults['_controller'][0]);
|
||||
$this->assertEquals($new_defaults['_controller'][1], 'getContentResult');
|
||||
|
||||
// Set _entity_list and ensure that the entity list controller is set.
|
||||
$defaults = array();
|
||||
$defaults['_entity_list'] = 'entity_test.default';
|
||||
$new_defaults = $route_enhancer->enhance($defaults, $request);
|
||||
$this->assertEquals('\Drupal\Core\Entity\Controller\EntityListController::listing', $new_defaults['_content'], 'The entity list controller was not set.');
|
||||
$this->assertEquals('\Drupal\Core\Entity\Controller\EntityListController::listing', $new_defaults['_controller'], 'The entity list controller was not set.');
|
||||
$this->assertEquals('entity_test.default', $new_defaults['entity_type']);
|
||||
$this->assertFalse(isset($new_defaults['_entity_list']));
|
||||
|
||||
|
|
@ -62,7 +60,7 @@ class EntityRouteEnhancerTest extends UnitTestCase {
|
|||
$defaults['_entity_view'] = 'entity_test.full';
|
||||
$defaults['entity_test'] = 'Mock entity';
|
||||
$defaults = $route_enhancer->enhance($defaults, $request);
|
||||
$this->assertEquals('\Drupal\Core\Entity\Controller\EntityViewController::view', $defaults['_content'], 'The entity view controller was not set.');
|
||||
$this->assertEquals('\Drupal\Core\Entity\Controller\EntityViewController::view', $defaults['_controller'], 'The entity view controller was not set.');
|
||||
$this->assertEquals($defaults['_entity'], 'Mock entity');
|
||||
$this->assertEquals($defaults['view_mode'], 'full');
|
||||
$this->assertFalse(isset($defaults['_entity_view']));
|
||||
|
|
@ -85,7 +83,7 @@ class EntityRouteEnhancerTest extends UnitTestCase {
|
|||
|
||||
$defaults[RouteObjectInterface::ROUTE_OBJECT] = $route;
|
||||
$defaults = $route_enhancer->enhance($defaults, $request);
|
||||
$this->assertEquals('\Drupal\Core\Entity\Controller\EntityViewController::view', $defaults['_content'], 'The entity view controller was not set.');
|
||||
$this->assertEquals('\Drupal\Core\Entity\Controller\EntityViewController::view', $defaults['_controller'], 'The entity view controller was not set.');
|
||||
$this->assertEquals($defaults['_entity'], 'Mock entity');
|
||||
$this->assertEquals($defaults['view_mode'], 'full');
|
||||
$this->assertFalse(isset($defaults['_entity_view']));
|
||||
|
|
@ -95,7 +93,7 @@ class EntityRouteEnhancerTest extends UnitTestCase {
|
|||
$defaults['_entity_view'] = 'entity_test';
|
||||
$defaults['entity_test'] = 'Mock entity';
|
||||
$defaults = $route_enhancer->enhance($defaults, $request);
|
||||
$this->assertEquals('\Drupal\Core\Entity\Controller\EntityViewController::view', $defaults['_content'], 'The entity view controller was not set.');
|
||||
$this->assertEquals('\Drupal\Core\Entity\Controller\EntityViewController::view', $defaults['_controller'], 'The entity view controller was not set.');
|
||||
$this->assertEquals($defaults['_entity'], 'Mock entity');
|
||||
$this->assertTrue(empty($defaults['view_mode']));
|
||||
$this->assertFalse(isset($defaults['_entity_view']));
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ class EntityResolverManagerTest extends UnitTestCase {
|
|||
*/
|
||||
public function testSetRouteOptionsWithContentController($controller) {
|
||||
$route = new Route('/example/{argument}', array(
|
||||
'_content' => $controller,
|
||||
'_controller' => $controller,
|
||||
'argument' => 'test',
|
||||
));
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ class EntityResolverManagerTest extends UnitTestCase {
|
|||
$this->setupEntityTypes();
|
||||
|
||||
$route = new Route('/example/{entity_test}', array(
|
||||
'_content' => $controller,
|
||||
'_controller' => $controller,
|
||||
));
|
||||
|
||||
$defaults = $route->getDefaults();
|
||||
|
|
@ -201,7 +201,7 @@ class EntityResolverManagerTest extends UnitTestCase {
|
|||
$this->setupEntityTypes();
|
||||
|
||||
$route = new Route('/example/{entity_test}', array(
|
||||
'_content' => $controller,
|
||||
'_controller' => $controller,
|
||||
));
|
||||
|
||||
$defaults = $route->getDefaults();
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ class RoutePreloaderTest extends UnitTestCase {
|
|||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$route_collection = new RouteCollection();
|
||||
$route_collection->add('test', new Route('/admin/foo', array('_content' => 'Drupal\ExampleController')));
|
||||
$route_collection->add('test2', new Route('/admin/bar', array('_content' => 'Drupal\ExampleController')));
|
||||
$route_collection->add('test', new Route('/admin/foo', array('_controller' => 'Drupal\ExampleController')));
|
||||
$route_collection->add('test2', new Route('/admin/bar', array('_controller' => 'Drupal\ExampleController')));
|
||||
$event->expects($this->once())
|
||||
->method('getRouteCollection')
|
||||
->will($this->returnValue($route_collection));
|
||||
|
|
@ -89,10 +89,10 @@ class RoutePreloaderTest extends UnitTestCase {
|
|||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$route_collection = new RouteCollection();
|
||||
$route_collection->add('test', new Route('/foo/admin/foo', array('_content' => 'Drupal\ExampleController')));
|
||||
$route_collection->add('test2', new Route('/bar/admin/bar', array('_content' => 'Drupal\ExampleController')));
|
||||
$route_collection->add('test3', new Route('/administrator/a', array('_content' => 'Drupal\ExampleController')));
|
||||
$route_collection->add('test4', new Route('/admin', array('_content' => 'Drupal\ExampleController')));
|
||||
$route_collection->add('test', new Route('/foo/admin/foo', array('_controller' => 'Drupal\ExampleController')));
|
||||
$route_collection->add('test2', new Route('/bar/admin/bar', array('_controller' => 'Drupal\ExampleController')));
|
||||
$route_collection->add('test3', new Route('/administrator/a', array('_controller' => 'Drupal\ExampleController')));
|
||||
$route_collection->add('test4', new Route('/admin', array('_controller' => 'Drupal\ExampleController')));
|
||||
$event->expects($this->once())
|
||||
->method('getRouteCollection')
|
||||
->will($this->returnValue($route_collection));
|
||||
|
|
@ -113,8 +113,8 @@ class RoutePreloaderTest extends UnitTestCase {
|
|||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$route_collection = new RouteCollection();
|
||||
$route_collection->add('test', new Route('/admin/foo', array('_content' => 'Drupal\ExampleController')));
|
||||
$route_collection->add('test2', new Route('/bar', array('_content' => 'Drupal\ExampleController')));
|
||||
$route_collection->add('test', new Route('/admin/foo', array('_controller' => 'Drupal\ExampleController')));
|
||||
$route_collection->add('test2', new Route('/bar', array('_controller' => 'Drupal\ExampleController')));
|
||||
// Non content routes, like ajax callbacks should be ignored.
|
||||
$route_collection->add('test3', new Route('/bar', array('_controller' => 'Drupal\ExampleController')));
|
||||
$event->expects($this->once())
|
||||
|
|
|
|||
Loading…
Reference in New Issue