You are here

public function ContextDefinitionInterface::setAssignmentRestriction in Rules 8.3

Sets the assignment restriction mode for this context.

Parameters

string|null $restriction: Either ASSIGNMENT_RESTRICTION_INPUT for contexts that are only allowed to be provided as input values, ASSIGNMENT_RESTRICTION_SELECTOR for contexts that must be provided as data selectors or NULL if there is no restriction for this context.

Return value

$this

2 methods override ContextDefinitionInterface::setAssignmentRestriction()
ContextDefinition::setAssignmentRestriction in src/Context/ContextDefinition.php
Sets the assignment restriction mode for this context.
EntityContextDefinition::setAssignmentRestriction in src/Context/EntityContextDefinition.php
Sets the assignment restriction mode for this context.

File

src/Context/ContextDefinitionInterface.php, line 63

Class

ContextDefinitionInterface
Context definition information required by Rules.

Namespace

Drupal\rules\Context

Code

public function setAssignmentRestriction($restriction);