protected function RevisionOverviewController::buildRevertRevisionLink in Entity API 8.0
Same name and namespace in other branches
- 8 src/Controller/RevisionOverviewController.php \Drupal\entity\Controller\RevisionOverviewController::buildRevertRevisionLink()
Builds a link to revert an entity revision.
Parameters
\Drupal\Core\Entity\EntityInterface $entity_revision: The entity to build a revert revision link for.
Return value
array A link render array.
Overrides RevisionControllerTrait::buildRevertRevisionLink
File
- src/
Controller/ RevisionOverviewController.php, line 77 - Contains \Drupal\entity\Controller\RevisionOverviewController.
Class
- RevisionOverviewController
- Provides a controller which shows the revision history.
Namespace
Drupal\entity\ControllerCode
protected function buildRevertRevisionLink(EntityInterface $entity_revision) {
if ($entity_revision
->hasLinkTemplate('revision-revert')) {
return [
'title' => t('Revert'),
'url' => $entity_revision
->toUrl('revision-revert'),
];
}
}