You are here

abstract class DataProviderEntityDecorator in RESTful 7.2

Hierarchy

Expanded class hierarchy of DataProviderEntityDecorator

File

src/Plugin/resource/DataProvider/DataProviderEntityDecorator.php, line 12
Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderEntityDecorator.

Namespace

Drupal\restful\Plugin\resource\DataProvider
View source
abstract class DataProviderEntityDecorator extends DataProviderDecorator implements DataProviderEntityInterface {

  /**
   * Decorated provider.
   *
   * @var DataProviderEntityInterface
   */
  protected $decorated;

  /**
   * Contstructs a DataProviderDecorator class.
   *
   * @param DataProviderEntityInterface $decorated
   *   The decorated data provider.
   */
  public function __construct(DataProviderEntityInterface $decorated) {

    // We are overriding the constructor only for the
    // DataProviderEntityInterface type hinting.
    parent::__construct($decorated);
  }

  /**
   * Allow manipulating the entity before it is saved.
   *
   * @param \EntityDrupalWrapper $wrapper
   *   The unsaved wrapped entity.
   */
  public function entityPreSave(\EntityDrupalWrapper $wrapper) {
    $this->decorated
      ->entityPreSave($wrapper);
  }

  /**
   * Validate an entity before it is saved.
   *
   * @param \EntityDrupalWrapper $wrapper
   *   The wrapped entity.
   *
   * @throws BadRequestException
   */
  public function entityValidate(\EntityDrupalWrapper $wrapper) {
    $this->decorated
      ->entityValidate($wrapper);
  }

  /**
   * Gets a EFQ object.
   *
   * @return \EntityFieldQuery
   *   The object that inherits from \EntityFieldQuery.
   */
  public function EFQObject() {
    return $this->decorated
      ->EFQObject();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DataProviderDecorator::addOptions public function Adds the options in the provided array to the data provider options. Overrides DataProviderInterface::addOptions
DataProviderDecorator::canonicalPath public function Generates the canonical path for a given path. Overrides DataProviderInterface::canonicalPath
DataProviderDecorator::count public function Counts the total results for the index call. Overrides CrudInterface::count
DataProviderDecorator::create public function Create operation. Overrides CrudInterface::create
DataProviderDecorator::discover public function Return the discovery information for the given entity. Overrides DataProviderInterface::discover
DataProviderDecorator::getAccount public function Gets the authenticated account. Overrides DataProviderInterface::getAccount
DataProviderDecorator::getCacheFragments public function Gets the entity context. Overrides DataProviderInterface::getCacheFragments
DataProviderDecorator::getIndexIds public function Returns the ID to render for the current index GET request. Overrides DataProviderInterface::getIndexIds
DataProviderDecorator::getLangCode public function Get the language code. Overrides DataProviderInterface::getLangCode
DataProviderDecorator::getMetadata public function Returns the metadata collection. Overrides DataProviderInterface::getMetadata
DataProviderDecorator::getOptions public function Gets the data provider options. Overrides DataProviderInterface::getOptions
DataProviderDecorator::getRange public function Gets the range. Overrides DataProviderInterface::getRange
DataProviderDecorator::getRequest public function Gets the request. Overrides DataProviderInterface::getRequest
DataProviderDecorator::getResourcePath public function Get the resource path. Overrides DataProviderInterface::getResourcePath
DataProviderDecorator::index public function List operation. Overrides CrudInterface::index
DataProviderDecorator::isNestedField public static function Checks if the passed in string is a dot-nested field. Overrides DataProviderInterface::isNestedField
DataProviderDecorator::methodAccess public function Checks if the provided field can be used with the current method. Overrides DataProviderInterface::methodAccess
DataProviderDecorator::processFilterInput public static function Processes the input for a filter and adds the appropriate defaults. Overrides DataProviderInterface::processFilterInput
DataProviderDecorator::remove public function Delete operation. Overrides CrudInterface::remove
DataProviderDecorator::setAccount public function Sets the authenticated account. Overrides DataProviderInterface::setAccount
DataProviderDecorator::setLangCode public function Sets the language code. Overrides DataProviderInterface::setLangCode
DataProviderDecorator::setOptions public function Sets the options. Overrides DataProviderInterface::setOptions
DataProviderDecorator::setRange public function Sets the range. Overrides DataProviderInterface::setRange
DataProviderDecorator::setRequest public function Sets the request. Overrides DataProviderInterface::setRequest
DataProviderDecorator::setResourcePath public function Set the resource path. Overrides DataProviderInterface::setResourcePath
DataProviderDecorator::update public function Update operation. Overrides CrudInterface::update
DataProviderDecorator::view public function Read operation. Overrides CrudInterface::view
DataProviderDecorator::viewMultiple public function Read operation. Overrides CrudInterface::viewMultiple
DataProviderEntityDecorator::$decorated protected property Decorated provider. Overrides DataProviderDecorator::$decorated
DataProviderEntityDecorator::EFQObject public function Gets a EFQ object. Overrides DataProviderEntityInterface::EFQObject
DataProviderEntityDecorator::entityPreSave public function Allow manipulating the entity before it is saved. Overrides DataProviderEntityInterface::entityPreSave
DataProviderEntityDecorator::entityValidate public function Validate an entity before it is saved. Overrides DataProviderEntityInterface::entityValidate
DataProviderEntityDecorator::__construct public function Contstructs a DataProviderDecorator class. Overrides DataProviderDecorator::__construct