You are here

public function ResourceFieldResource::access in RESTful 7.2

Check access on property by the defined access callbacks.

Parameters

string $op: The operation that access should be checked for. Can be "view" or "edit". Defaults to "edit".

DataInterpreterInterface $interpreter: The data source representing the entity.

Return value

bool TRUE if the current user has access to set the property, FALSE otherwise. The default implementation assumes that if no callback has explicitly denied access, we grant the user permission.

Overrides ResourceFieldInterface::access

File

src/Plugin/resource/Field/ResourceFieldResource.php, line 158
Contains \Drupal\restful\Plugin\resource\Field\ResourceFieldResource.

Class

ResourceFieldResource

Namespace

Drupal\restful\Plugin\resource\Field

Code

public function access($op, DataInterpreterInterface $interpreter) {
  return $this->decorated
    ->access($op, $interpreter);
}