Broken.php

Same filename in this branch
  1. 9 core/modules/views/src/Plugin/views/sort/Broken.php
  2. 9 core/modules/views/src/Plugin/views/field/Broken.php
  3. 9 core/modules/views/src/Plugin/views/relationship/Broken.php
  4. 9 core/modules/views/src/Plugin/views/filter/Broken.php
  5. 9 core/modules/views/src/Plugin/views/area/Broken.php
  6. 9 core/modules/views/src/Plugin/views/argument/Broken.php
  7. 9 core/lib/Drupal/Core/Block/Plugin/Block/Broken.php
Same filename in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/sort/Broken.php
  2. 8.9.x core/modules/views/src/Plugin/views/field/Broken.php
  3. 8.9.x core/modules/views/src/Plugin/views/relationship/Broken.php
  4. 8.9.x core/modules/views/src/Plugin/views/filter/Broken.php
  5. 8.9.x core/modules/views/src/Plugin/views/area/Broken.php
  6. 8.9.x core/modules/views/src/Plugin/views/argument/Broken.php
  7. 8.9.x core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/Broken.php
  8. 8.9.x core/lib/Drupal/Core/Block/Plugin/Block/Broken.php
  9. 10 core/modules/views/src/Plugin/views/sort/Broken.php
  10. 10 core/modules/views/src/Plugin/views/field/Broken.php
  11. 10 core/modules/views/src/Plugin/views/relationship/Broken.php
  12. 10 core/modules/views/src/Plugin/views/filter/Broken.php
  13. 10 core/modules/views/src/Plugin/views/area/Broken.php
  14. 10 core/modules/views/src/Plugin/views/argument/Broken.php
  15. 10 core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/Broken.php
  16. 10 core/lib/Drupal/Core/Block/Plugin/Block/Broken.php
  17. 11.x core/modules/views/src/Plugin/views/sort/Broken.php
  18. 11.x core/modules/views/src/Plugin/views/field/Broken.php
  19. 11.x core/modules/views/src/Plugin/views/relationship/Broken.php
  20. 11.x core/modules/views/src/Plugin/views/filter/Broken.php
  21. 11.x core/modules/views/src/Plugin/views/area/Broken.php
  22. 11.x core/modules/views/src/Plugin/views/argument/Broken.php
  23. 11.x core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/Broken.php
  24. 11.x core/lib/Drupal/Core/Block/Plugin/Block/Broken.php

Namespace

Drupal\Core\Entity\Plugin\EntityReferenceSelection

File

core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/Broken.php

View source
<?php

namespace Drupal\Core\Entity\Plugin\EntityReferenceSelection;

use Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginBase;
use Drupal\Core\Form\FormStateInterface;

/**
 * Defines a fallback plugin for missing entity_reference selection plugins.
 *
 * @EntityReferenceSelection(
 *   id = "broken",
 *   label = @Translation("Broken/Missing")
 * )
 */
class Broken extends SelectionPluginBase {
    
    /**
     * {@inheritdoc}
     */
    public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
        $form = parent::buildConfigurationForm($form, $form_state);
        $form['selection_handler'] = [
            '#markup' => $this->t('The selected selection handler is broken.'),
        ];
        return $form;
    }
    
    /**
     * {@inheritdoc}
     */
    public function getReferenceableEntities($match = NULL, $match_operator = 'CONTAINS', $limit = 0) {
        return [];
    }
    
    /**
     * {@inheritdoc}
     */
    public function countReferenceableEntities($match = NULL, $match_operator = 'CONTAINS') {
        return 0;
    }
    
    /**
     * {@inheritdoc}
     */
    public function validateReferenceableEntities(array $ids) {
        return [];
    }

}

Classes

Title Deprecated Summary
Broken Defines a fallback plugin for missing entity_reference selection plugins.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.