You are here

protected function EntityLegalDocumentVersion::urlRouteParameters in Entity Legal 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Entity/EntityLegalDocumentVersion.php \Drupal\entity_legal\Entity\EntityLegalDocumentVersion::urlRouteParameters()
  2. 4.0.x src/Entity/EntityLegalDocumentVersion.php \Drupal\entity_legal\Entity\EntityLegalDocumentVersion::urlRouteParameters()

Gets an array of placeholders for this entity.

Individual entity classes may override this method to add additional placeholders if desired. If so, they should be sure to replicate the property caching logic.

Parameters

string $rel: The link relationship type, for example: canonical or edit-form.

Return value

array An array of URI placeholders.

Overrides EntityBase::urlRouteParameters

File

src/Entity/EntityLegalDocumentVersion.php, line 194

Class

EntityLegalDocumentVersion
Defines the entity legal document version entity.

Namespace

Drupal\entity_legal\Entity

Code

protected function urlRouteParameters($rel) {
  $uri_route_parameters = parent::urlRouteParameters($rel);
  if (in_array($rel, [
    'canonical',
    'edit-form',
    'entity_hierarchy_reorder',
    'token-devel',
    'drupal:content-translation-overview',
    'drupal:content-translation-add',
    'drupal:content-translation-edit',
    'drupal:content-translation-delete',
  ])) {
    $uri_route_parameters['entity_legal_document'] = $this
      ->bundle();
  }
  return $uri_route_parameters;
}