block_content.routing.yml

Same filename in other branches
  1. 9 core/modules/block_content/block_content.routing.yml
  2. 8.9.x core/modules/block_content/block_content.routing.yml
  3. 11.x core/modules/block_content/block_content.routing.yml
core/modules/block_content/block_content.routing.yml
9 string references to YAML keys in block_content.routing.yml
BlockContentAddLocalAction::getOptions in core/modules/block_content/src/Plugin/Menu/LocalAction/BlockContentAddLocalAction.php
Returns options for rendering a link for the local action.
BlockContentBlock::build in core/modules/block_content/src/Plugin/Block/BlockContentBlock.php
Builds and returns the renderable array for this block plugin.
BlockContentLocalTasksTest::getBlockContentListingRoutes in core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php
Provides a list of routes to test.
BlockContentLocalTasksTest::testBlockContentListLocalTasks in core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php
Checks block_content listing local tasks.
BlockContentTypeTest::testBlockContentTypeEditing in core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php
Tests editing a block type using the UI.

... See full list

File

core/modules/block_content/block_content.routing.yml

View source
  1. block_content.add_page:
  2. path: '/block/add'
  3. defaults:
  4. _controller: '\Drupal\block_content\Controller\BlockContentController::add'
  5. _title: 'Add content block'
  6. options:
  7. _admin_route: TRUE
  8. requirements:
  9. _entity_create_any_access: 'block_content'
  10. # @todo Deprecate this route once
  11. # https://www.drupal.org/project/drupal/issues/3159210 is fixed, or remove
  12. # it in Drupal 11.
  13. # @see https://www.drupal.org/node/3320855
  14. entity.block_content_type.collection.bc:
  15. path: '/admin/structure/block/block-content/types'
  16. defaults:
  17. _controller: '\Drupal\block_content\Controller\BlockContentController::blockContentTypeRedirect'
  18. options:
  19. _admin_route: TRUE
  20. requirements:
  21. _permission: 'administer block types'
  22. # @todo Deprecate this route once
  23. # https://www.drupal.org/project/drupal/issues/3159210 is fixed, or remove
  24. # it in Drupal 11.
  25. # @see https://www.drupal.org/node/3320855
  26. entity.block_content_type.edit_form.bc:
  27. path: '/admin/structure/block/block-content/manage/{block_content_type}'
  28. defaults:
  29. _controller: '\Drupal\block_content\Controller\BlockContentController::blockContentTypeRedirect'
  30. options:
  31. _admin_route: TRUE
  32. requirements:
  33. _permission: 'administer block types'
  34. block_content.add_form:
  35. path: '/block/add/{block_content_type}'
  36. defaults:
  37. _controller: '\Drupal\block_content\Controller\BlockContentController::addForm'
  38. _title_callback: '\Drupal\block_content\Controller\BlockContentController::getAddFormTitle'
  39. options:
  40. _admin_route: TRUE
  41. requirements:
  42. _entity_create_access: 'block_content:{block_content_type}'
  43. entity.block_content.canonical:
  44. path: '/admin/content/block/{block_content}'
  45. defaults:
  46. _entity_form: 'block_content.edit'
  47. _title_callback: '\Drupal\Core\Entity\Controller\EntityController::title'
  48. options:
  49. _admin_route: TRUE
  50. requirements:
  51. _entity_access: 'block_content.update'
  52. block_content: \d+
  53. entity.block_content.edit_form:
  54. path: '/admin/content/block/{block_content}'
  55. defaults:
  56. _entity_form: 'block_content.edit'
  57. options:
  58. _admin_route: TRUE
  59. requirements:
  60. _entity_access: 'block_content.update'
  61. block_content: \d+
  62. # @todo Deprecate this route once
  63. # https://www.drupal.org/project/drupal/issues/3159210 is fixed, or remove
  64. # it in Drupal 11.
  65. # @see https://www.drupal.org/node/2317981
  66. entity.block_content.edit_form.bc:
  67. path: '/block/{block_content}'
  68. defaults:
  69. _controller: '\Drupal\block_content\Controller\BlockContentController::editRedirect'
  70. options:
  71. _admin_route: TRUE
  72. requirements:
  73. _entity_access: 'block_content.update'
  74. block_content: \d+
  75. entity.block_content.delete_form:
  76. path: '/admin/content/block/{block_content}/delete'
  77. defaults:
  78. _entity_form: 'block_content.delete'
  79. _title: 'Delete'
  80. options:
  81. _admin_route: TRUE
  82. requirements:
  83. _entity_access: 'block_content.delete'
  84. block_content: \d+
  85. # @todo Deprecate this route once
  86. # https://www.drupal.org/project/drupal/issues/3159210 is fixed, or remove
  87. # it in Drupal 11.
  88. # @see https://www.drupal.org/node/2317981
  89. entity.block_content.delete_form.bc:
  90. path: '/block/{block_content}/delete'
  91. defaults:
  92. _controller: '\Drupal\block_content\Controller\BlockContentController::editRedirect'
  93. options:
  94. _admin_route: TRUE
  95. requirements:
  96. _entity_access: 'block_content.delete'
  97. block_content: \d+
  98. block_content.type_add:
  99. path: '/admin/structure/block-content/add'
  100. defaults:
  101. _entity_form: 'block_content_type.add'
  102. _title: 'Add'
  103. requirements:
  104. _entity_create_access: 'block_content_type'
  105. entity.block_content.collection:
  106. path: '/admin/content/block'
  107. defaults:
  108. _title: 'Content blocks'
  109. _entity_list: 'block_content'
  110. requirements:
  111. _permission: 'access block library+administer block content'
  112. # @todo Deprecate this route once
  113. # https://www.drupal.org/project/drupal/issues/3159210 is fixed, or remove
  114. # it in Drupal 11.
  115. # @see https://www.drupal.org/node/3320855
  116. entity.block_content.collection.bc:
  117. path: '/admin/structure/block/block-content'
  118. defaults:
  119. _controller: '\Drupal\block_content\Controller\BlockContentController::blockLibraryRedirect'
  120. requirements:
  121. _permission: 'access block library+administer block content'

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.