RevisionableContentEntityBase.php in Entity API 8.0
File
src/Revision/RevisionableContentEntityBase.php
View source
<?php
namespace Drupal\entity\Revision;
use Drupal\Core\Entity\ContentEntityBase;
abstract class RevisionableContentEntityBase extends ContentEntityBase {
protected function urlRouteParameters($rel) {
$uri_route_parameters = [];
if ($rel != 'collection') {
$uri_route_parameters[$this
->getEntityTypeId()] = $this
->id();
}
if (strpos($this
->getEntityType()
->getLinkTemplate($rel), $this
->getEntityTypeId() . '_revision') !== FALSE) {
$uri_route_parameters[$this
->getEntityTypeId() . '_revision'] = $this
->getRevisionId();
}
return $uri_route_parameters;
}
}