class MissingValueContextException

Same name in other branches
  1. 9 core/lib/Drupal/Component/Plugin/Exception/MissingValueContextException.php \Drupal\Component\Plugin\Exception\MissingValueContextException
  2. 8.9.x core/lib/Drupal/Component/Plugin/Exception/MissingValueContextException.php \Drupal\Component\Plugin\Exception\MissingValueContextException
  3. 11.x core/lib/Drupal/Component/Plugin/Exception/MissingValueContextException.php \Drupal\Component\Plugin\Exception\MissingValueContextException

An exception class thrown when contexts exist but are missing a value.

Hierarchy

Expanded class hierarchy of MissingValueContextException

3 files declare their use of MissingValueContextException
BlockAccessControlHandler.php in core/modules/block/src/BlockAccessControlHandler.php
ContextHandler.php in core/lib/Drupal/Core/Plugin/Context/ContextHandler.php
ContextHandlerTest.php in core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php

File

core/lib/Drupal/Component/Plugin/Exception/MissingValueContextException.php, line 8

Namespace

Drupal\Component\Plugin\Exception
View source
class MissingValueContextException extends ContextException {
    
    /**
     * MissingValueContextException constructor.
     *
     * @param string[] $contexts_without_value
     *   List of contexts with missing value.
     */
    public function __construct(array $contexts_without_value = []) {
        $message = 'Required contexts without a value: ' . implode(', ', $contexts_without_value);
        parent::__construct($message);
    }

}

Members

Title Sort descending Modifiers Object type Summary
MissingValueContextException::__construct public function MissingValueContextException constructor.

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