public function DataProvider::methodAccess in RESTful 7.2
Checks if the provided field can be used with the current method.
Parameters
ResourceFieldInterface $resource_field: The field.
Return value
bool TRUE if acces is granted. FALSE otherwise.
Overrides DataProviderInterface::methodAccess
7 calls to DataProvider::methodAccess()
- DataProviderDbQuery::create in src/
Plugin/ resource/ DataProvider/ DataProviderDbQuery.php - Create operation.
- DataProviderDbQuery::mapDbRowToPublicFields in src/
Plugin/ resource/ DataProvider/ DataProviderDbQuery.php - DataProviderDbQuery::update in src/
Plugin/ resource/ DataProvider/ DataProviderDbQuery.php - Update operation.
- DataProviderEntity::setPropertyValues in src/
Plugin/ resource/ DataProvider/ DataProviderEntity.php - Set properties of the entity based on the request, and save the entity.
- DataProviderEntity::view in src/
Plugin/ resource/ DataProvider/ DataProviderEntity.php - Read operation.
File
- src/
Plugin/ resource/ DataProvider/ DataProvider.php, line 327 - Contains \Drupal\restful\Plugin\resource\DataProvider\DataProvider.
Class
Namespace
Drupal\restful\Plugin\resource\DataProviderCode
public function methodAccess(ResourceFieldInterface $resource_field) {
return in_array($this
->getRequest()
->getMethod(), $resource_field
->getMethods());
}