You are here

public function FlippingBookType::getPermissionName in Flipping Book 8

Returns the machine-readable permission name for the flipping book type.

Return value

string|bool The machine-readable permission name, or FALSE if the flipping book type is malformed.

Overrides FlippingBookTypeInterface::getPermissionName

File

src/Entity/FlippingBookType.php, line 60

Class

FlippingBookType
Defines the Flipping Book type entity.

Namespace

Drupal\flipping_book\Entity

Code

public function getPermissionName() {
  if ($this
    ->id()) {
    return 'access ' . $this
      ->id() . ' flipping book';
  }
  return FALSE;
}