You are here

protected function DataProviderEntity::checkEntityAccess in RESTful 7.2

Check access to CRUD an entity.

Parameters

string $op: The operation. Allowed values are "create", "update" and "delete".

string $entity_type: The entity type.

object $entity: The entity object.

Return value

bool TRUE or FALSE based on the access. If no access is known about the entity return NULL.

2 calls to DataProviderEntity::checkEntityAccess()
DataProviderEntity::create in src/Plugin/resource/DataProvider/DataProviderEntity.php
Create operation.
DataProviderEntity::isValidEntity in src/Plugin/resource/DataProvider/DataProviderEntity.php
Determine if an entity is valid, and accessible.
1 method overrides DataProviderEntity::checkEntityAccess()
DataProviderTaxonomyTerm::checkEntityAccess in tests/modules/restful_test/src/Plugin/resource/taxonomy_term/v1/DataProviderTaxonomyTerm.php
Check access to CRUD an entity.

File

src/Plugin/resource/DataProvider/DataProviderEntity.php, line 957
Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderEntity.

Class

DataProviderEntity
Class DataProviderEntity.

Namespace

Drupal\restful\Plugin\resource\DataProvider

Code

protected function checkEntityAccess($op, $entity_type, $entity) {
  $account = $this
    ->getAccount();
  return entity_access($op, $entity_type, $entity, $account);
}