function ContextDefinitionInterface::setRequired

Same name in other branches
  1. 9 core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php \Drupal\Component\Plugin\Context\ContextDefinitionInterface::setRequired()
  2. 8.9.x core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php \Drupal\Component\Plugin\Context\ContextDefinitionInterface::setRequired()
  3. 11.x core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php \Drupal\Component\Plugin\Context\ContextDefinitionInterface::setRequired()

Sets whether the data is required.

Parameters

bool $required: (optional) Whether the data is multi-valued. Defaults to TRUE.

Return value

$this

1 method overrides ContextDefinitionInterface::setRequired()
ContextDefinition::setRequired in core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php

File

core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php, line 107

Class

ContextDefinitionInterface
Interface used to define definition objects found in ContextInterface.

Namespace

Drupal\Component\Plugin\Context

Code

public function setRequired($required = TRUE);

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