You are here

protected function DataProviderTaxonomyTerm::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.

Overrides DataProviderEntity::checkEntityAccess

File

tests/modules/restful_test/src/Plugin/resource/taxonomy_term/v1/DataProviderTaxonomyTerm.php, line 19
Contains \Drupal\restful_test\Plugin\resource\taxonomy_term\v1\DataProviderTaxonomyTerm.

Class

DataProviderTaxonomyTerm

Namespace

Drupal\restful_test\Plugin\resource\taxonomy_term\v1

Code

protected function checkEntityAccess($op, $entity_type, $entity) {
  $account = $this
    ->getAccount();
  return user_access('create article content', $account);
}