You are here

protected function RestfulEntityBase::checkEntityAccess in RESTful 7

Check access to CRUD an entity.

Parameters

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

$entity_type: The entity type.

$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 RestfulEntityBase::checkEntityAccess()
RestfulEntityBase::createEntity in plugins/restful/RestfulEntityBase.php
Create a new entity.
RestfulEntityBase::isValidEntity in plugins/restful/RestfulEntityBase.php
Determine if an entity is valid, and accessible.
2 methods override RestfulEntityBase::checkEntityAccess()
RestfulEntityTaxonomyTermTags::checkEntityAccess in modules/restful_example/plugins/restful/taxonomy_term/tags/1.0/RestfulEntityTaxonomyTermTags.class.php
Overrides \RestfulEntityBaseTaxonomyTerm::checkEntityAccess().
RestfulEntityTaxonomyTermTestTags::checkEntityAccess in tests/modules/restful_test/plugins/restful/taxonomy_term/test_tags/1.0/RestfulEntityTaxonomyTermTestTags.class.php
Overrides \RestfulEntityBaseTaxonomyTerm::checkEntityAccess().

File

plugins/restful/RestfulEntityBase.php, line 1208
Contains RestfulEntityBase.

Class

RestfulEntityBase
An abstract implementation of RestfulEntityInterface.

Code

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