function Entity::getContextDefinition

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::getContextDefinition()
  2. 8.9.x core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::getContextDefinition()
  3. 11.x core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::getContextDefinition()

Overrides ArgumentValidatorPluginBase::getContextDefinition

File

core/modules/views/src/Plugin/views/argument_validator/Entity.php, line 255

Class

Entity
Defines an argument validator plugin for each entity type.

Namespace

Drupal\views\Plugin\views\argument_validator

Code

public function getContextDefinition() {
    return EntityContextDefinition::fromEntityTypeId($this->definition['entity_type'])
        ->setLabel($this->argument
        ->adminLabel())
        ->setRequired(FALSE);
}

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