entity_abuse-1.1.x-dev/entity_abuse.routing.yml

entity_abuse.routing.yml
entity_abuse.settings:
  path: '/admin/structure/entity-abuse'
  defaults:
    _form: '\Drupal\entity_abuse\Form\EntityAbuseSettingsForm'
    _title: 'Entity abuse settings'
  requirements:
    _permission: 'entity_abuse manage settings'

entity.entity_abuse_report.canonical:
  path: '/entity-abuse-report/{entity_abuse_report}'
  defaults:
    _entity_view: 'entity_abuse_report.full'
    _title: 'Abuse report'
  requirements:
    entity_abuse_report: \d+
    _entity_access: 'entity_abuse_report.view'

entity.entity_abuse_report.delete_form:
  path: '/entity-abuse-report/{entity_abuse_report}/delete'
  defaults:
    _entity_form: 'entity_abuse_report.delete'
    _title: 'Delete abuse report'
  requirements:
    entity_abuse_report: \d+
    _entity_access: 'entity_abuse_report.delete'

entity.entity_abuse_report.edit_form:
  path: '/entity-abuse-report/{entity_abuse_report}/edit'
  defaults:
    _entity_form: 'entity_abuse_report.default'
    _title: 'Edit abuse report'
  requirements:
    entity_abuse_report: \d+
    _entity_access: 'entity_abuse_report.update'

entity.entity_abuse_report.add_form:
  path: '/entity-abuse-report/{entity_type}/{entity_id}'
  defaults:
    _entity_form: 'entity_abuse_report.default'
    _title: 'Add abuse report'
  requirements:
    _entity_create_access: 'entity_abuse_report'
    entity_type: '[a-z0-9_]+'
    entity_id: \d+
    # Uncomment on https://www.drupal.org/project/drupal/issues/2730351 fixed.
    # _csrf_token: 'TRUE'

entity_abuse.no_access:
  path: '/entity-abuse-report-access/{entity_type}/{entity_id}'
  defaults:
    _title: 'No access'
    _controller: '\Drupal\entity_abuse\Controller\EntityAbuseNoAccess::page'
  requirements:
    entity_type: '[a-z0-9_]+'
    entity_id: \d+
    # Needs to be accessed by an anonymous user.
    _access: 'TRUE'

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc