public function Entity::getContextDefinition in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::getContextDefinition()
- 9 core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::getContextDefinition()
File
- core/
modules/ views/ src/ Plugin/ views/ argument_validator/ Entity.php, line 256
Class
- Entity
- Defines an argument validator plugin for each entity type.
Namespace
Drupal\views\Plugin\views\argument_validatorCode
public function getContextDefinition() {
return EntityContextDefinition::fromEntityTypeId($this->definition['entity_type'])
->setLabel($this->argument
->adminLabel())
->setRequired(FALSE);
}