block_content.routing.yml 1.71 KB
Newer Older
1 2 3
block_content.add_page:
  path: '/block/add'
  defaults:
4
    _controller: '\Drupal\block_content\Controller\BlockContentController::add'
5 6 7 8 9 10 11 12 13
    _title: 'Add custom block'
  options:
    _admin_route: TRUE
  requirements:
    _permission: 'administer blocks'

block_content.add_form:
  path: '/block/add/{block_content_type}'
  defaults:
14
    _controller: '\Drupal\block_content\Controller\BlockContentController::addForm'
15 16 17 18 19 20
    _title_callback: 'Drupal\block_content\Controller\BlockContentController::getAddFormTitle'
  options:
    _admin_route: TRUE
  requirements:
    _permission: 'administer blocks'

21
entity.block_content.canonical:
22 23 24
  path: '/block/{block_content}'
  defaults:
    _entity_form: 'block_content.edit'
25 26 27 28
  options:
    _admin_route: TRUE
  requirements:
    _entity_access: 'block_content.update'
29
    block_content: \d+
30 31 32 33 34

entity.block_content.edit_form:
  path: '/block/{block_content}'
  defaults:
    _entity_form: 'block_content.edit'
35 36 37 38
  options:
    _admin_route: TRUE
  requirements:
    _entity_access: 'block_content.update'
39
    block_content: \d+
40

41
entity.block_content.delete_form:
42 43 44 45 46 47 48 49
  path: '/block/{block_content}/delete'
  defaults:
    _entity_form: 'block_content.delete'
    _title: 'Delete'
  options:
    _admin_route: TRUE
  requirements:
    _entity_access: 'block_content.delete'
50
    block_content: \d+
51 52 53 54 55 56 57 58 59

block_content.type_add:
  path: '/admin/structure/block/block-content/types/add'
  defaults:
    _entity_form: 'block_content_type.add'
    _title: 'Add'
  requirements:
    _permission: 'administer blocks'

60
entity.block_content.collection:
61 62 63 64 65 66
  path: '/admin/structure/block/block-content'
  defaults:
    _title: 'Custom block library'
    _entity_list: 'block_content'
  requirements:
    _permission: 'administer blocks'