Defines the access control handler for the Paragraphs type entity type.
Expanded class hierarchy of ParagraphsTypeAccessControlHandler
\Drupal\paragraphs\Entity\ParagraphsType
class ParagraphsTypeAccessControlHandler extends EntityAccessControlHandler {
/**
* {@inheritdoc}
*/
protected $viewLabelOperation = TRUE;
/**
* {@inheritdoc}
*/
protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
switch ($operation) {
case 'view label':
return AccessResult::allowedIfHasPermission($account, 'access content');
default:
return parent::checkAccess($entity, $operation, $account);
}
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ParagraphsTypeAccessControlHandler:: |
protected | property | ||
ParagraphsTypeAccessControlHandler:: |
protected | function |