You are here

public function ContextDefinitionInterface::setRequired in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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
Sets whether the data is required.

File

core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php, line 110
Contains \Drupal\Component\Plugin\Context\ContextDefinitionInterface.

Class

ContextDefinitionInterface
Interface for context definitions.

Namespace

Drupal\Component\Plugin\Context

Code

public function setRequired($required = TRUE);