function MissingValueContextException::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Component/Plugin/Exception/MissingValueContextException.php \Drupal\Component\Plugin\Exception\MissingValueContextException::__construct()
  2. 10 core/lib/Drupal/Component/Plugin/Exception/MissingValueContextException.php \Drupal\Component\Plugin\Exception\MissingValueContextException::__construct()
  3. 11.x core/lib/Drupal/Component/Plugin/Exception/MissingValueContextException.php \Drupal\Component\Plugin\Exception\MissingValueContextException::__construct()

MissingValueContextException constructor.

Parameters

string[] $contexts_without_value: List of contexts with missing value.

File

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

Class

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

Namespace

Drupal\Component\Plugin\Exception

Code

public function __construct(array $contexts_without_value = []) {
    $message = 'Required contexts without a value: ' . implode(', ', $contexts_without_value);
    parent::__construct($message);
}

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