MissingValueContextException.php

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

Namespace

Drupal\Component\Plugin\Exception

File

core/lib/Drupal/Component/Plugin/Exception/MissingValueContextException.php

View source
<?php

namespace Drupal\Component\Plugin\Exception;


/**
 * An exception class thrown when contexts exist but are missing a value.
 */
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);
    }

}

Classes

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

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