public function PanelizerInterface::hasEntityPermission in Panelizer 8.4
Same name and namespace in other branches
- 8.5 src/PanelizerInterface.php \Drupal\panelizer\PanelizerInterface::hasEntityPermission()
- 8.3 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\panelizerCode
public function hasEntityPermission($op, EntityInterface $entity, $view_mode, AccountInterface $account = NULL);