protected function DataProviderDbQuery::mapDbRowToPublicFields in RESTful 7.2
3 calls to DataProviderDbQuery::mapDbRowToPublicFields()
- DataProviderDbQuery::index in src/
Plugin/ resource/ DataProvider/ DataProviderDbQuery.php - List operation.
- DataProviderDbQuery::view in src/
Plugin/ resource/ DataProvider/ DataProviderDbQuery.php - Read operation.
- DataProviderDbQuery::viewMultiple in src/
Plugin/ resource/ DataProvider/ DataProviderDbQuery.php - Read operation.
File
- src/
Plugin/ resource/ DataProvider/ DataProviderDbQuery.php, line 226 - Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderDbQuery.
Class
Namespace
Drupal\restful\Plugin\resource\DataProviderCode
protected function mapDbRowToPublicFields($row) {
$resource_field_collection = $this
->initResourceFieldCollection($row);
// Loop over all the defined public fields.
foreach ($this->fieldDefinitions as $public_field_name => $resource_field) {
$value = NULL;
/* @var ResourceFieldDbColumnInterface $resource_field */
if (!$this
->methodAccess($resource_field)) {
// Allow passing the value in the request.
continue;
}
$resource_field_collection
->set($resource_field
->id(), $resource_field);
}
return $resource_field_collection;
}