/**
  * Constructor.
  *
  * @param RequestInterface $request
  *   The request.
  * @param ResourceFieldCollectionInterface $field_definitions
  *   The field definitions.
  * @param object $account
  *   The authenticated account.
  * @param string $plugin_id
  *   The resource ID.
  * @param string $resource_path
  *   The resource path.
  * @param array $options
  *   The plugin options for the data provider.
  * @param string $langcode
  *   (Optional) The entity language code.
  * @param ResourceInterface $resource
  *   The referenced resource.
  */
 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);
 }
 /**
  * {@inheritdoc}
  */
 public function getDataProvider()
 {
     return $this->subject->getDataProvider();
 }