function Context::hasContextValue

Same name in this branch
  1. 10 core/lib/Drupal/Component/Plugin/Context/Context.php \Drupal\Component\Plugin\Context\Context::hasContextValue()
Same name in other branches
  1. 9 core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::hasContextValue()
  2. 9 core/lib/Drupal/Component/Plugin/Context/Context.php \Drupal\Component\Plugin\Context\Context::hasContextValue()
  3. 8.9.x core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::hasContextValue()
  4. 8.9.x core/lib/Drupal/Component/Plugin/Context/Context.php \Drupal\Component\Plugin\Context\Context::hasContextValue()
  5. 11.x core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::hasContextValue()
  6. 11.x core/lib/Drupal/Component/Plugin/Context/Context.php \Drupal\Component\Plugin\Context\Context::hasContextValue()

Overrides Context::hasContextValue

File

core/lib/Drupal/Core/Plugin/Context/Context.php, line 83

Class

Context
A Drupal specific context wrapper class.

Namespace

Drupal\Core\Plugin\Context

Code

public function hasContextValue() {
    return $this->getTypedDataManager()
        ->getCanonicalRepresentation($this->getContextData()) !== NULL;
}

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