You are here

class MissingValueContextException in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/Plugin/Exception/MissingValueContextException.php \Drupal\Component\Plugin\Exception\MissingValueContextException
  2. 10 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
Contains \Drupal\Tests\Core\Plugin\ContextHandlerTest.

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

Namesort descending Modifiers Type Description Overrides
MissingValueContextException::__construct public function MissingValueContextException constructor.