You are here

class SelectionBroken in Entity reference 8

A null implementation of EntityReference_SelectionHandler.

Hierarchy

Expanded class hierarchy of SelectionBroken

2 files declare their use of SelectionBroken
entityreference.module in ./entityreference.module
Provides a field that can reference other entities.
SelectionBase.php in lib/Drupal/entityreference/Plugin/entityreference/selection/SelectionBase.php
Definition of Drupal\entityreference\Plugin\entityreference\selection\SelectionBase.

File

lib/Drupal/entityreference/Plugin/Type/Selection/SelectionBroken.php, line 22
Definition of Drupal\entityreference\Plugin\entityreference\selection\SelectionBroken.

Namespace

Drupal\entityreference\Plugin\Type\Selection
View source
class SelectionBroken implements SelectionInterface {
  protected function __construct($field, $instance) {
    $this->field = $field;
    $this->instance = $instance;
  }
  public static function settingsForm($field, $instance) {
    $form['selection_handler'] = array(
      '#markup' => t('The selected selection handler is broken.'),
    );
    return $form;
  }
  public function getReferencableEntities($match = NULL, $match_operator = 'CONTAINS', $limit = 0) {
    return array();
  }
  public function countReferencableEntities($match = NULL, $match_operator = 'CONTAINS') {
    return 0;
  }
  public function validateReferencableEntities(array $ids) {
    return array();
  }
  public function validateAutocompleteInput($input, &$element, &$form_state, $form) {
  }
  public function entityFieldQueryAlter(AlterableInterface $query) {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SelectionBroken::countReferencableEntities public function Count entities that are referencable by a given field. Overrides SelectionInterface::countReferencableEntities
SelectionBroken::entityFieldQueryAlter public function Give the handler a chance to alter the SelectQuery generated by EntityFieldQuery. Overrides SelectionInterface::entityFieldQueryAlter
SelectionBroken::getReferencableEntities public function Return a list of referencable entities. Overrides SelectionInterface::getReferencableEntities
SelectionBroken::settingsForm public static function Generate a settings form for this handler. Overrides SelectionInterface::settingsForm
SelectionBroken::validateAutocompleteInput public function Validate Input from autocomplete widget that has no Id. Overrides SelectionInterface::validateAutocompleteInput
SelectionBroken::validateReferencableEntities public function Validate that entities can be referenced by this field. Overrides SelectionInterface::validateReferencableEntities
SelectionBroken::__construct protected function