function VersionHistoryController::getOperationLinks

Same name in other branches
  1. 11.x core/lib/Drupal/Core/Entity/Controller/VersionHistoryController.php \Drupal\Core\Entity\Controller\VersionHistoryController::getOperationLinks()

Get operations for an entity revision.

Parameters

\Drupal\Core\Entity\RevisionableInterface $revision: The entity to build revision links for.

Return value

array An array of operation links.

1 call to VersionHistoryController::getOperationLinks()
VersionHistoryController::buildRow in core/lib/Drupal/Core/Entity/Controller/VersionHistoryController.php
Builds a table row for a revision.

File

core/lib/Drupal/Core/Entity/Controller/VersionHistoryController.php, line 309

Class

VersionHistoryController
Provides a controller showing revision history for an entity.

Namespace

Drupal\Core\Entity\Controller

Code

protected function getOperationLinks(RevisionableInterface $revision) : array {
    // Removes links which are inaccessible or not rendered.
    return array_filter([
        $this->buildRevertRevisionLink($revision),
        $this->buildDeleteRevisionLink($revision),
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.