public function DataProviderResource::__construct in RESTful 7.2
Constructor.
Parameters
RequestInterface $request: The request.
ResourceFieldCollectionInterface $field_definitions: The field definitions.
object $account: The authenticated account.
string $plugin_id: The resource ID.
string $resource_path: The resource path.
array $options: The plugin options for the data provider.
string $langcode: (Optional) The entity language code.
ResourceInterface $resource: The referenced resource.
Overrides DataProvider::__construct
File
- src/
Plugin/ resource/ DataProvider/ DataProviderResource.php, line 59 - Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderResource.
Class
- DataProviderResource
- This data provider creates a resource and uses it to access the data.
Namespace
Drupal\restful\Plugin\resource\DataProviderCode
public function __construct(RequestInterface $request, ResourceFieldCollectionInterface $field_definitions, $account, $plugin_id, $resource_path, array $options, $langcode = NULL, ResourceInterface $resource = NULL) {
$resource
->setRequest($request);
$this->resource = $resource;
$this->referencedDataProvider = $resource
->getDataProvider();
parent::__construct($request, $field_definitions, $account, $plugin_id, $resource_path, $options, $langcode);
}