protected function ConsentAgreement::urlRouteParameters in General Data Protection Regulation 8.2
Same name and namespace in other branches
- 8 modules/gdpr_consent/src/Entity/ConsentAgreement.php \Drupal\gdpr_consent\Entity\ConsentAgreement::urlRouteParameters()
- 3.0.x modules/gdpr_consent/src/Entity/ConsentAgreement.php \Drupal\gdpr_consent\Entity\ConsentAgreement::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
- modules/
gdpr_consent/ src/ Entity/ ConsentAgreement.php, line 87
Class
- ConsentAgreement
- Defines the ConsentAgreement entity.
Namespace
Drupal\gdpr_consent\EntityCode
protected function urlRouteParameters($rel) {
$uriRouteParameters = parent::urlRouteParameters($rel);
if ($this instanceof RevisionableInterface) {
if ($rel === 'revision_revert') {
$uriRouteParameters[$this
->getEntityTypeId() . '_revision'] = $this
->getRevisionId();
}
elseif ($rel === 'revision_delete') {
$uriRouteParameters[$this
->getEntityTypeId() . '_revision'] = $this
->getRevisionId();
}
}
return $uriRouteParameters;
}