You are here

protected function RevisionOverviewController::hasDeleteRevisionAccess in Entity API 8

Same name and namespace in other branches
  1. 8.0 src/Controller/RevisionOverviewController.php \Drupal\entity\Controller\RevisionOverviewController::hasDeleteRevisionAccess()

Determines if the user has permission to delete revisions.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to check delete revision access for.

Return value

bool TRUE if the user has delete revision access.

Overrides RevisionControllerTrait::hasDeleteRevisionAccess

File

src/Controller/RevisionOverviewController.php, line 61

Class

RevisionOverviewController
Provides a controller which shows the revision history.

Namespace

Drupal\entity\Controller

Code

protected function hasDeleteRevisionAccess(EntityInterface $entity) {
  return $this
    ->currentUser()
    ->hasPermission("delete all {$entity->getEntityTypeId()} revisions");
}