interface DataProviderInterface in RESTful 7.2
Hierarchy
- interface \Drupal\restful\Plugin\resource\CrudInterface
- interface \Drupal\restful\Plugin\resource\DataProvider\DataProviderInterface
Expanded class hierarchy of DataProviderInterface
All classes that implement DataProviderInterface
8 files declare their use of DataProviderInterface
- AuthenticatedResource.php in src/
Plugin/ resource/ AuthenticatedResource.php - Contains \Drupal\restful\Plugin\resource\AuthenticatedResource
- CacheDecoratedResource.php in src/
Plugin/ resource/ Decorators/ CacheDecoratedResource.php - Contains \Drupal\restful\Plugin\resource\Decorators\CacheDecoratedResource
- DataProviderComment.php in modules/
restful_example/ src/ Plugin/ resource/ comment/ DataProviderComment.php - Contains \Drupal\restful_example\Plugin\resource\comment\DataProviderComment.
- DataProviderVariable.php in modules/
restful_example/ src/ Plugin/ resource/ variables/ DataProviderVariable.php - Contains \Drupal\restful_example\Plugin\resource\variables\DataProviderVariable.
- DataProviderVariableInterface.php in modules/
restful_example/ src/ Plugin/ resource/ variables/ DataProviderVariableInterface.php - Contains \Drupal\restful_example\Plugin\resource\variables\DataProviderVariableInterface.
File
- src/
Plugin/ resource/ DataProvider/ DataProviderInterface.php, line 14 - Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderInterface.
Namespace
Drupal\restful\Plugin\resource\DataProviderView source
interface DataProviderInterface extends CrudInterface {
/**
* Return the discovery information for the given entity.
*
* @param string $path
* The request path.
*
* @return array
* An array of data for the thing being discovered.
*/
public function discover($path = NULL);
/**
* Checks if the passed in string is a dot-nested field.
*
* @param string $field_name
* The field name.
*
* @return bool
* TRUE if the field is nested. FALSE otherwise.
*/
public static function isNestedField($field_name);
/**
* Processes the input for a filter and adds the appropriate defaults.
*
* @param mixed $filter
* The input value for the filter.
* @param string $public_field
* The public name for the filter.
*
* @throws \Drupal\restful\Exception\BadRequestException
*
* @return array
* The processed filter item with all of the defaults.
*/
public static function processFilterInput($filter, $public_field);
/**
* Gets the range.
*
* @return int
* The range
*/
public function getRange();
/**
* Sets the range.
*
* @param int $range
* The range
*/
public function setRange($range);
/**
* Gets the authenticated account.
*
* @return object
* The fully loaded user account.
*/
public function getAccount();
/**
* Sets the authenticated account.
*
* @param object $account
* The fully loaded user account.
*/
public function setAccount($account);
/**
* Gets the request.
*
* @return RequestInterface
* The request.
*/
public function getRequest();
/**
* Sets the request.
*
* @param RequestInterface $request
* The request.
*/
public function setRequest(RequestInterface $request);
/**
* Get the language code.
*
* @return string
* The language code
*/
public function getLangCode();
/**
* Sets the language code.
*
* @param string $langcode
* The language code.
*/
public function setLangCode($langcode);
/**
* Gets the data provider options.
*
* @return array
* The array of options for the data provider.
*/
public function getOptions();
/**
* Adds the options in the provided array to the data provider options.
*
* @param array $options
* The array of options for the data provider.
*/
public function addOptions(array $options);
/**
* Gets the entity context.
*
* @param mixed $identifier
* The ID.
*/
public function getCacheFragments($identifier);
/**
* Generates the canonical path for a given path.
*
* @param string $path
* The aliased path.
*
* @return string
* The canonical path.
*/
public function canonicalPath($path);
/**
* Checks if the provided field can be used with the current method.
*
* @param ResourceFieldInterface $resource_field
* The field.
*
* @return bool
* TRUE if acces is granted. FALSE otherwise.
*/
public function methodAccess(ResourceFieldInterface $resource_field);
/**
* Sets the options.
*
* @param array $options
* The options to set.
*/
public function setOptions(array $options);
/**
* Returns the ID to render for the current index GET request.
*
* @return array
* Numeric array containing the identifiers to be sent to viewMultiple.
*/
public function getIndexIds();
/**
* Set the resource path.
*
* @param string $resource_path
* The resource path.
*/
public function setResourcePath($resource_path);
/**
* Get the resource path.
*
* @return string
* The resource path.
*/
public function getResourcePath();
/**
* Returns the metadata collection.
*
* Data providers can add metadata reflecting the data gathering/setting
* process. This information is made available to formatters via the resource
* so extra metadata can be added to the output.
*
* @return \Doctrine\Common\Collections\ArrayCollection
* The collection object.
*/
public function getMetadata();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CrudInterface:: |
public | function | Counts the total results for the index call. | 8 |
CrudInterface:: |
public | function | Create operation. | 8 |
CrudInterface:: |
public | function | List operation. | 3 |
CrudInterface:: |
public | function | Delete operation. | 8 |
CrudInterface:: |
public | function | Update operation. | 8 |
CrudInterface:: |
public | function | Read operation. | 8 |
CrudInterface:: |
public | function | Read operation. | 8 |
DataProviderInterface:: |
public | function | Adds the options in the provided array to the data provider options. | 3 |
DataProviderInterface:: |
public | function | Generates the canonical path for a given path. | 3 |
DataProviderInterface:: |
public | function | Return the discovery information for the given entity. | 3 |
DataProviderInterface:: |
public | function | Gets the authenticated account. | 3 |
DataProviderInterface:: |
public | function | Gets the entity context. | 3 |
DataProviderInterface:: |
public | function | Returns the ID to render for the current index GET request. | 8 |
DataProviderInterface:: |
public | function | Get the language code. | 3 |
DataProviderInterface:: |
public | function | Returns the metadata collection. | 3 |
DataProviderInterface:: |
public | function | Gets the data provider options. | 3 |
DataProviderInterface:: |
public | function | Gets the range. | 3 |
DataProviderInterface:: |
public | function | Gets the request. | 3 |
DataProviderInterface:: |
public | function | Get the resource path. | 3 |
DataProviderInterface:: |
public static | function | Checks if the passed in string is a dot-nested field. | 3 |
DataProviderInterface:: |
public | function | Checks if the provided field can be used with the current method. | 3 |
DataProviderInterface:: |
public static | function | Processes the input for a filter and adds the appropriate defaults. | 3 |
DataProviderInterface:: |
public | function | Sets the authenticated account. | 3 |
DataProviderInterface:: |
public | function | Sets the language code. | 3 |
DataProviderInterface:: |
public | function | Sets the options. | 3 |
DataProviderInterface:: |
public | function | Sets the range. | 3 |
DataProviderInterface:: |
public | function | Sets the request. | 3 |
DataProviderInterface:: |
public | function | Set the resource path. | 3 |