public function ResourceFieldResource::__construct in RESTful 7.2
Constructor.
Parameters
array $field: Contains the field values.
RequestInterface $request: The request.
File
- src/
Plugin/ resource/ Field/ ResourceFieldResource.php, line 65 - Contains \Drupal\restful\Plugin\resource\Field\ResourceFieldResource.
Class
Namespace
Drupal\restful\Plugin\resource\FieldCode
public function __construct(array $field, RequestInterface $request) {
if ($this->decorated) {
$this
->setRequest($request);
}
$this->resourceMachineName = $field['resource']['name'];
// Compute the target column if empty.
if (!empty($field['targetColumn'])) {
$this->targetColumn = $field['targetColumn'];
}
}