You are here

public function EntityLegalDocument::getPermissionView in Entity Legal 4.0.x

Same name and namespace in other branches
  1. 8.2 src/Entity/EntityLegalDocument.php \Drupal\entity_legal\Entity\EntityLegalDocument::getPermissionView()
  2. 3.0.x src/Entity/EntityLegalDocument.php \Drupal\entity_legal\Entity\EntityLegalDocument::getPermissionView()

Get the permission name for any user viewing this agreement.

Return value

string The user permission, used with user_access.

Overrides EntityLegalDocumentInterface::getPermissionView

File

src/Entity/EntityLegalDocument.php, line 273

Class

EntityLegalDocument
Defines the entity legal document entity.

Namespace

Drupal\entity_legal\Entity

Code

public function getPermissionView() {
  return 'legal view ' . $this
    ->id();
}