Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Broken.php

class Broken

Same name in this branch
  1. 11.1.x core/lib/Drupal/Core/Block/Plugin/Block/Broken.php \Drupal\Core\Block\Plugin\Block\Broken
  2. 11.1.x core/modules/views/src/Plugin/views/sort/Broken.php \Drupal\views\Plugin\views\sort\Broken
  3. 11.1.x core/modules/views/src/Plugin/views/argument/Broken.php \Drupal\views\Plugin\views\argument\Broken
  4. 11.1.x core/modules/views/src/Plugin/views/filter/Broken.php \Drupal\views\Plugin\views\filter\Broken
  5. 11.1.x core/modules/views/src/Plugin/views/relationship/Broken.php \Drupal\views\Plugin\views\relationship\Broken
  6. 11.1.x core/modules/views/src/Plugin/views/field/Broken.php \Drupal\views\Plugin\views\field\Broken
  7. 11.1.x core/modules/views/src/Plugin/views/area/Broken.php \Drupal\views\Plugin\views\area\Broken

Defines a fallback plugin for missing entity_reference selection plugins.

Note this plugin does not appear in the UI and is only used when a plugin can not found.

Hierarchy

  • class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
    • class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
      • class \Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginBase extends \Drupal\Core\Plugin\PluginBase implements \Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface, \Drupal\Component\Plugin\ConfigurableInterface, \Drupal\Component\Plugin\DependentPluginInterface
        • class \Drupal\Core\Entity\Plugin\EntityReferenceSelection\Broken extends \Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginBase

Expanded class hierarchy of Broken

12 string references to 'Broken'
BlockManager::getFallbackPluginId in core/lib/Drupal/Core/Block/BlockManager.php
Gets a fallback id for a missing plugin.
FieldPluginBase::addAdditionalFields in core/modules/views/src/Plugin/views/field/FieldPluginBase.php
Add 'additional' fields to the query.
SelectionPluginManager::getFallbackPluginId in core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManager.php
Gets a fallback id for a missing plugin.
View::addDisplay in core/modules/views/src/Entity/View.php
Adds a new display handler to the view, automatically creating an ID.
ViewEditForm::getFormBucket in core/modules/views_ui/src/ViewEditForm.php
Add information about a section to a display.

... See full list

File

core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/Broken.php, line 16

Namespace

Drupal\Core\Entity\Plugin\EntityReferenceSelection
View source
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 [];
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
Broken::buildConfigurationForm public function Form constructor. Overrides SelectionPluginBase::buildConfigurationForm
Broken::countReferenceableEntities public function Counts entities that are referenceable. Overrides SelectionInterface::countReferenceableEntities
Broken::getReferenceableEntities public function Gets the list of referenceable entities. Overrides SelectionInterface::getReferenceableEntities
Broken::validateReferenceableEntities public function Validates which existing entities can be referenced. Overrides SelectionInterface::validateReferenceableEntities
SelectionPluginBase::calculateDependencies public function Calculates dependencies for the configured plugin. Overrides DependentPluginInterface::calculateDependencies
SelectionPluginBase::defaultConfiguration public function Gets default configuration for this plugin. Overrides ConfigurableInterface::defaultConfiguration 2
SelectionPluginBase::entityQueryAlter public function Allows the selection to alter the SelectQuery generated by EntityFieldQuery. Overrides SelectionInterface::entityQueryAlter 2
SelectionPluginBase::getConfiguration public function Gets this plugin's configuration. Overrides ConfigurableInterface::getConfiguration
SelectionPluginBase::setConfiguration public function Sets the configuration for this plugin instance. Overrides ConfigurableInterface::setConfiguration
SelectionPluginBase::submitConfigurationForm public function Form submission handler. Overrides PluginFormInterface::submitConfigurationForm
SelectionPluginBase::validateConfigurationForm public function Form validation handler. Overrides PluginFormInterface::validateConfigurationForm
SelectionPluginBase::__construct public function Constructs a new selection object. 2

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal