You are here

public function ContextDefinition::setAllowNull in Typed Data API enhancements 8

Sets the "allow NULL value" behavior.

Parameters

bool $null_allowed: TRUE if NULL values should be allowed, FALSE otherwise.

Return value

$this

Overrides ContextDefinitionInterface::setAllowNull

File

src/Context/ContextDefinition.php, line 100

Class

ContextDefinition
Extends the core context definition class with useful methods.

Namespace

Drupal\typed_data\Context

Code

public function setAllowNull($null_allowed) {
  $this->allowNull = $null_allowed;
  return $this;
}