You are here

class RelationalFilter in RESTful 7.2

Class RelationalFilter.

@package Drupal\restful\Util

Hierarchy

Expanded class hierarchy of RelationalFilter

1 file declares its use of RelationalFilter
DataProviderEntity.php in src/Plugin/resource/DataProvider/DataProviderEntity.php
Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderEntity.

File

src/Util/RelationalFilter.php, line 15
Contains \Drupal\restful\Util\RelationalFilter.

Namespace

Drupal\restful\Util
View source
class RelationalFilter implements RelationalFilterInterface {

  /**
   * Name of the field or property.
   *
   * @var string
   */
  protected $name;

  /**
   * Type of filter: field or property.
   *
   * @var string
   */
  protected $type;

  /**
   * The referenced entity type.
   *
   * @var string
   */
  protected $entityType;

  /**
   * The referenced bundles.
   *
   * @var string[]
   */
  protected $bundles = array();

  /**
   * Database column for field filters.
   *
   * @var string
   */
  protected $column;

  /**
   * Database column for the target table relationship.
   *
   * @var string
   */
  protected $targetColumn;

  /**
   * Constructs the RelationalFilter object.
   *
   * @param string $name
   * @param string $type
   * @param string $column
   * @param string $entity_type
   * @param array $bundles
   * @param string $targetColumn
   */
  public function __construct($name, $type, $column, $entity_type, array $bundles = array(), $target_column = NULL) {
    $this->name = $name;
    $this->type = $type;
    $this->column = $column;
    $this->entityType = $entity_type;
    $this->bundles = $bundles;
    $this->targetColumn = $target_column;
  }

  /**
   * {@inheritdoc}
   */
  public function getName() {
    return $this->name;
  }

  /**
   * {@inheritdoc}
   */
  public function getType() {
    return $this->type;
  }

  /**
   * {@inheritdoc}
   */
  public function getEntityType() {
    return $this->entityType;
  }

  /**
   * {@inheritdoc}
   */
  public function getBundles() {
    return $this->bundles;
  }

  /**
   * {@inheritdoc}
   */
  public function getColumn() {
    return $this->column;
  }

  /**
   * {@inheritdoc}
   */
  public function getTargetColumn() {
    return $this->targetColumn;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
RelationalFilter::$bundles protected property The referenced bundles.
RelationalFilter::$column protected property Database column for field filters.
RelationalFilter::$entityType protected property The referenced entity type.
RelationalFilter::$name protected property Name of the field or property.
RelationalFilter::$targetColumn protected property Database column for the target table relationship.
RelationalFilter::$type protected property Type of filter: field or property.
RelationalFilter::getBundles public function The bundles. Overrides RelationalFilterInterface::getBundles
RelationalFilter::getColumn public function Database column for field filters. Overrides RelationalFilterInterface::getColumn
RelationalFilter::getEntityType public function Gets the entity type. Overrides RelationalFilterInterface::getEntityType
RelationalFilter::getName public function Get the name. Overrides RelationalFilterInterface::getName
RelationalFilter::getTargetColumn public function Database column for the target table relationship. Overrides RelationalFilterInterface::getTargetColumn
RelationalFilter::getType public function Get the type. Overrides RelationalFilterInterface::getType
RelationalFilter::__construct public function Constructs the RelationalFilter object.
RelationalFilterInterface::TYPE_FIELD constant
RelationalFilterInterface::TYPE_PROPERTY constant