commit 0d17daef7ab0a60daf1a408d48802dac5e41eb86 Author: Tim Plunkett Date: Wed May 21 15:14:21 2014 -0700 Stop validating. diff --git a/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php b/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php index e24ea43..f04f07d 100644 --- a/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php +++ b/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php @@ -130,12 +130,6 @@ public function setContextValue($name, $value) { $context_definition = $this->getContextDefinition($name); $this->context[$name] = new Context($context_definition); $this->context[$name]->setContextValue($value); - - // Verify the provided value validates. - $violations = $this->context[$name]->validate(); - if (count($violations) > 0) { - throw new PluginException("The provided context value does not pass validation."); - } return $this; } diff --git a/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php b/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php index 19f5825..d369bcc 100644 --- a/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php +++ b/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php @@ -8,7 +8,6 @@ namespace Drupal\Core\Plugin; use Drupal\Component\Plugin\ContextAwarePluginBase as ComponentContextAwarePluginBase; -use Drupal\Component\Plugin\Exception\PluginException; use Drupal\Core\Plugin\Context\Context; use Drupal\Component\Plugin\Discovery\DiscoveryInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; @@ -48,11 +47,6 @@ public function setContextValue($name, $value) { // Use the Drupal specific context class. $this->context[$name] = new Context($context_definition); $this->context[$name]->setContextValue($value); - - // Verify the provided value validates. - if ($this->context[$name]->validate()->count() > 0) { - throw new PluginException("The provided context value does not pass validation."); - } return $this; }