X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Fviews%2Fsrc%2FPlugin%2Fviews%2Fargument_validator%2FEntity.php;fp=web%2Fcore%2Fmodules%2Fviews%2Fsrc%2FPlugin%2Fviews%2Fargument_validator%2FEntity.php;h=befbbe7c26fe3c9ff6182d8a1e91e065d6bf967b;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=896d24bf64c994941ae30bad661e12992f53d981;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/web/core/modules/views/src/Plugin/views/argument_validator/Entity.php b/web/core/modules/views/src/Plugin/views/argument_validator/Entity.php index 896d24bf6..befbbe7c2 100644 --- a/web/core/modules/views/src/Plugin/views/argument_validator/Entity.php +++ b/web/core/modules/views/src/Plugin/views/argument_validator/Entity.php @@ -5,7 +5,7 @@ namespace Drupal\views\Plugin\views\argument_validator; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Plugin\Context\ContextDefinition; +use Drupal\Core\Plugin\Context\EntityContextDefinition; use Drupal\views\Plugin\views\argument\ArgumentPluginBase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -233,7 +233,9 @@ class Entity extends ArgumentValidatorPluginBase { * {@inheritdoc} */ public function getContextDefinition() { - return new ContextDefinition('entity:' . $this->definition['entity_type'], $this->argument->adminLabel(), FALSE); + return EntityContextDefinition::fromEntityTypeId($this->definition['entity_type']) + ->setLabel($this->argument->adminLabel()) + ->setRequired(FALSE); } }