You are here

public function PanelizerInterface::hasEntityPermission in Panelizer 8.5

Same name and namespace in other branches
  1. 8.3 src/PanelizerInterface.php \Drupal\panelizer\PanelizerInterface::hasEntityPermission()
  2. 8.4 src/PanelizerInterface.php \Drupal\panelizer\PanelizerInterface::hasEntityPermission()

Checks if a user has permission to perform an operation on an entity.

Parameters

string $op: The operation. Possible values include:

  • "revert to default"
  • "change content"

\Drupal\Core\Entity\EntityInterface $entity: The entity.

string $view_mode: The view mode.

\Drupal\Core\Session\AccountInterface|NULL $account: (optional) The user account to check; or the current user if omitted.

Return value

bool TRUE if the user has permission; FALSE otherwise.

1 method overrides PanelizerInterface::hasEntityPermission()
Panelizer::hasEntityPermission in src/Panelizer.php
Checks if a user has permission to perform an operation on an entity.

File

src/PanelizerInterface.php, line 219

Class

PanelizerInterface
Interface for the Panelizer service.

Namespace

Drupal\panelizer

Code

public function hasEntityPermission($op, EntityInterface $entity, $view_mode, AccountInterface $account = NULL);