You are here

interface ResourceFieldCollectionInterface in RESTful 7.2

Hierarchy

  • interface \Drupal\restful\Plugin\resource\Field\ResourceFieldCollectionInterface extends \Drupal\restful\Plugin\resource\Field\Iterator \Drupal\restful\Plugin\resource\Field\Countable

Expanded class hierarchy of ResourceFieldCollectionInterface

All classes that implement ResourceFieldCollectionInterface

16 files declare their use of ResourceFieldCollectionInterface
CacheDecoratedDataProvider.php in src/Plugin/resource/DataProvider/CacheDecoratedDataProvider.php
Contains \Drupal\restful\Plugin\resource\DataProvider\CacheDecoratedDataProvider.
DataProvider.php in src/Plugin/resource/DataProvider/DataProvider.php
Contains \Drupal\restful\Plugin\resource\DataProvider\DataProvider.
DataProviderDbQuery.php in src/Plugin/resource/DataProvider/DataProviderDbQuery.php
Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderDbQuery.
DataProviderEntity.php in src/Plugin/resource/DataProvider/DataProviderEntity.php
Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderEntity.
DataProviderFile.php in src/Plugin/resource/DataProvider/DataProviderFile.php
Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderFile.

... See full list

File

src/Plugin/resource/Field/ResourceFieldCollectionInterface.php, line 14
Contains \Drupal\restful\Plugin\resource\Field\ResourceFieldCollectionInterface.

Namespace

Drupal\restful\Plugin\resource\Field
View source
interface ResourceFieldCollectionInterface extends \Iterator, \Countable {

  /**
   * Factory.
   *
   * Creates the collection and each one of the field resource fields in it
   * based on the configuration array.
   *
   * @param array $fields
   *   An array of field mappings.
   * @param RequestInterface $request
   *   The request.
   *
   * @return ResourceFieldCollectionInterface
   *   The newly created object.
   */
  public static function factory(array $fields = array(), RequestInterface $request = NULL);

  /**
   * Factory.
   *
   * Creates the collection based on the implementation of the static::getInfo
   * method.
   *
   * @return ResourceFieldCollectionInterface
   *   The newly created object.
   */
  public static function create();

  /**
   * Default get info implementation.
   *
   * This is the method the implementers need to overwrite in order to provide
   * their own field definitions.
   *
   * @return array
   *   The array with field mappings.
   */
  public static function getInfo();

  /**
   * Get an element of the collection by its key.
   *
   * @param string $key
   *   The key of the field.
   *
   * @return ResourceFieldInterface
   *   The requested field.
   */
  public function get($key);

  /**
   * Sets a field in the collection.
   *
   * @param string $key
   *   The key of the field.
   * @param ResourceFieldInterface $field
   *   The field to set.
   */
  public function set($key, ResourceFieldInterface $field);

  /**
   * Sets the data interpreter.
   *
   * @param DataInterpreterInterface $interpreter
   *   The interpreter.
   */
  public function setInterpreter($interpreter);

  /**
   * Gets the data interpreter.
   *
   * @return DataInterpreterInterface
   *   The interpreter.
   */
  public function getInterpreter();

  /**
   * Get the resource field that will return the ID.
   *
   * @return ResourceFieldInterface
   *   The field.
   */
  public function getIdField();

  /**
   * Set the resource field that will return the ID.
   *
   * @param ResourceFieldInterface $id_field
   *   The field to set.
   */
  public function setIdField($id_field);

  /**
   * Evaluate a parsed filter on a field collection.
   *
   * @param array $filter
   *   The parsed filter.
   *
   * @return bool
   *   TRUE if the collection matches the filter. FALSE otherwise.
   */
  public function evalFilter(array $filter);

  /**
   * Sets a context for the group of fields.
   *
   * @param string $context_id
   *   The context identifier. Ex: 'cache_fragments'.
   * @param ArrayCollection $context
   *   The context.
   */
  public function setContext($context_id, ArrayCollection $context);

  /**
   * Gets a context for the group of fields.
   *
   * @return ArrayCollection[]
   *   The context.
   */
  public function getContext();

  /**
   * Get the list of fields.
   *
   * @return string[]
   *   The fields.
   */
  public function getLimitFields();

  /**
   * Set the limit fields.
   *
   * @param string[] $limit_fields
   *   The list of fields to set.
   */
  public function setLimitFields($limit_fields);

  /**
   * Gets the resource name.
   *
   * @return string
   *   The resource name.
   */
  public function getResourceName();

  /**
   * Gets the resource ID.
   *
   * @return string
   *   The resource ID.
   */
  public function getResourceId();

  /**
   * Sets the resource ID.
   *
   * @param string $resource_id
   *   The resource ID.
   */
  public function setResourceId($resource_id);

}

Members

Namesort descending Modifiers Type Description Overrides
ResourceFieldCollectionInterface::create public static function Factory. 1
ResourceFieldCollectionInterface::evalFilter public function Evaluate a parsed filter on a field collection. 1
ResourceFieldCollectionInterface::factory public static function Factory. 1
ResourceFieldCollectionInterface::get public function Get an element of the collection by its key. 1
ResourceFieldCollectionInterface::getContext public function Gets a context for the group of fields. 1
ResourceFieldCollectionInterface::getIdField public function Get the resource field that will return the ID. 1
ResourceFieldCollectionInterface::getInfo public static function Default get info implementation. 1
ResourceFieldCollectionInterface::getInterpreter public function Gets the data interpreter. 1
ResourceFieldCollectionInterface::getLimitFields public function Get the list of fields. 1
ResourceFieldCollectionInterface::getResourceId public function Gets the resource ID. 1
ResourceFieldCollectionInterface::getResourceName public function Gets the resource name. 1
ResourceFieldCollectionInterface::set public function Sets a field in the collection. 1
ResourceFieldCollectionInterface::setContext public function Sets a context for the group of fields. 1
ResourceFieldCollectionInterface::setIdField public function Set the resource field that will return the ID. 1
ResourceFieldCollectionInterface::setInterpreter public function Sets the data interpreter. 1
ResourceFieldCollectionInterface::setLimitFields public function Set the limit fields. 1
ResourceFieldCollectionInterface::setResourceId public function Sets the resource ID. 1