You are here

public function PublishContentAccess::checkPermission in Publish Content 8

Helper method to check permission of user.

6 calls to PublishContentAccess::checkPermission()
PublishContentAccess::accessPublishAnyType in src/Access/PublishContentAccess.php
Access publish any content of specified type (bundle).
PublishContentAccess::accessPublishEditableType in src/Access/PublishContentAccess.php
Access publish content of specified which you have access to edit for.
PublishContentAccess::accessPublishOwnType in src/Access/PublishContentAccess.php
Access publish own content of specified type (bundle).
PublishContentAccess::accessUnpublishAnyType in src/Access/PublishContentAccess.php
Access unpublish any content of specified type (bundle).
PublishContentAccess::accessUnpublishEditableType in src/Access/PublishContentAccess.php
Access unpublish content of specified which you have access to edit for.

... See full list

File

src/Access/PublishContentAccess.php, line 75

Class

PublishContentAccess
Access class checking the permissions for publishing and unpublishing.

Namespace

Drupal\publishcontent\Access

Code

public function checkPermission($permission) {
  return $this->account
    ->hasPermission(Perm::getPermission($permission, $this->arguments));
}