Commit 429d9c67 authored by larowlan's avatar larowlan

Issue #2919890 by Darvanen, tstoeckler, xjm: Make BlockContentType use a route...

Issue #2919890 by Darvanen, tstoeckler, xjm: Make BlockContentType use a route provider instead of hard-coded routes
parent 38c2ac79
entity.block_content_type.collection:
path: '/admin/structure/block/block-content/types'
defaults:
_entity_list: 'block_content_type'
_title: 'Custom block library'
requirements:
_permission: 'administer blocks'
block_content.add_page:
path: '/block/add'
defaults:
......@@ -26,16 +18,6 @@ block_content.add_form:
requirements:
_permission: 'administer blocks'
entity.block_content_type.delete_form:
path: '/admin/structure/block/block-content/manage/{block_content_type}/delete'
defaults:
_entity_form: 'block_content_type.delete'
_title: 'Delete'
requirements:
_entity_access: 'block_content_type.delete'
options:
_admin_route: TRUE
entity.block_content.canonical:
path: '/block/{block_content}'
defaults:
......@@ -75,14 +57,6 @@ block_content.type_add:
requirements:
_permission: 'administer blocks'
entity.block_content_type.edit_form:
path: '/admin/structure/block/block-content/manage/{block_content_type}'
defaults:
_entity_form: 'block_content_type.edit'
_title_callback: '\Drupal\Core\Entity\Controller\EntityController::title'
requirements:
_entity_access: 'block_content_type.update'
entity.block_content.collection:
path: '/admin/structure/block/block-content'
defaults:
......
......@@ -11,6 +11,7 @@
* @ConfigEntityType(
* id = "block_content_type",
* label = @Translation("Custom block type"),
* label_collection = @Translation("Custom block library"),
* handlers = {
* "form" = {
* "default" = "Drupal\block_content\BlockContentTypeForm",
......@@ -18,6 +19,9 @@
* "edit" = "Drupal\block_content\BlockContentTypeForm",
* "delete" = "Drupal\block_content\Form\BlockContentTypeDeleteForm"
* },
* "route_provider" = {
* "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider"
* },
* "list_builder" = "Drupal\block_content\BlockContentTypeListBuilder"
* },
* admin_permission = "administer blocks",
......
......@@ -122,7 +122,7 @@ public function testBlockContentTypeEditing() {
$front_page_path => 'Home',
'admin/structure/block' => 'Block layout',
'admin/structure/block/block-content' => 'Custom block library',
'admin/structure/block/block-content/manage/basic' => 'Bar',
'admin/structure/block/block-content/manage/basic' => 'Edit Bar',
]);
\Drupal::entityManager()->clearCachedFieldDefinitions();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment