You are here

public function RestWSEntityResourceController::access in RESTful Web Services 7.2

Same name and namespace in other branches
  1. 7 restws.entity.inc \RestWSEntityResourceController::access()

Determines access for a given operation and resource.

Parameters

string $op: Either 'create', 'view' (= read), 'update' or 'delete'.

int|string $id: The id of the resource.

Overrides RestWSResourceControllerInterface::access

See also

entity_access()

File

./restws.entity.inc, line 338
RESTful web services module integration for entities.

Class

RestWSEntityResourceController
Controller for entity-bases resources.

Code

public function access($op, $id) {
  return entity_access($op, $this->entityType, isset($id) ? $this
    ->wrapper($id)
    ->value() : NULL);
}