class TestSelection

Same name in this branch
  1. 8.9.x core/modules/block_content/tests/modules/block_content_test/src/Plugin/EntityReferenceSelection/TestSelection.php \Drupal\block_content_test\Plugin\EntityReferenceSelection\TestSelection
Same name in other branches
  1. 9 core/modules/block_content/tests/modules/block_content_test/src/Plugin/EntityReferenceSelection/TestSelection.php \Drupal\block_content_test\Plugin\EntityReferenceSelection\TestSelection
  2. 10 core/modules/block_content/tests/modules/block_content_test/src/Plugin/EntityReferenceSelection/TestSelection.php \Drupal\block_content_test\Plugin\EntityReferenceSelection\TestSelection
  3. 11.x core/modules/block_content/tests/modules/block_content_test/src/Plugin/EntityReferenceSelection/TestSelection.php \Drupal\block_content_test\Plugin\EntityReferenceSelection\TestSelection

Provides a testing plugin.

Hierarchy

Expanded class hierarchy of TestSelection

File

core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php, line 207

Namespace

Drupal\Tests\Core\EntityReferenceSelection
View source
class TestSelection extends SelectionPluginBase {
    public function defaultConfiguration() {
        return [
            'setting2' => [
                'qux' => 'qux value',
            ],
            'setting3' => 'foobar',
        ] + parent::defaultConfiguration();
    }
    public function getReferenceableEntities($match = NULL, $match_operator = 'CONTAINS', $limit = 0) {
    }
    public function validateReferenceableEntities(array $ids) {
    }
    public function countReferenceableEntities($match = NULL, $match_operator = 'CONTAINS') {
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
SelectionPluginBase::buildConfigurationForm public function Form constructor. Overrides PluginFormInterface::buildConfigurationForm 3
SelectionPluginBase::calculateDependencies public function Calculates dependencies for the configured plugin. Overrides DependentPluginInterface::calculateDependencies
SelectionPluginBase::ensureBackwardCompatibilityConfiguration protected function Ensures a backward compatibility level configuration.
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::resolveBackwardCompatibilityConfiguration protected function Moves the backward compatibility level configurations in the right place.
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 1
SelectionPluginBase::__construct public function Constructs a new selection object. 2
TestSelection::countReferenceableEntities public function Counts entities that are referenceable. Overrides SelectionInterface::countReferenceableEntities
TestSelection::defaultConfiguration public function Gets default configuration for this plugin. Overrides SelectionPluginBase::defaultConfiguration 1
TestSelection::getReferenceableEntities public function Gets the list of referenceable entities. Overrides SelectionInterface::getReferenceableEntities
TestSelection::validateReferenceableEntities public function Validates which existing entities can be referenced. Overrides SelectionInterface::validateReferenceableEntities

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