function ContentEntityBase::access
Overrides EntityBase::access
2 calls to ContentEntityBase::access()
- Node::access in core/
modules/ node/ src/ Entity/ Node.php - Checks data value access.
- Node::access in core/
modules/ node/ src/ Entity/ Node.php - Checks data value access.
1 method overrides ContentEntityBase::access()
- Node::access in core/
modules/ node/ src/ Entity/ Node.php - Checks data value access.
File
-
core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php, line 730
Class
- ContentEntityBase
- Implements Entity Field API specific enhancements to the Entity class.
Namespace
Drupal\Core\EntityCode
public function access($operation, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
if ($operation == 'create') {
return $this->entityTypeManager()
->getAccessControlHandler($this->entityTypeId)
->createAccess($this->bundle(), $account, [], $return_as_object);
}
return $this->entityTypeManager()
->getAccessControlHandler($this->entityTypeId)
->access($this, $operation, $account, $return_as_object);
}