public function EntityContextDefinition::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
Overrides ContextDefinitionInterface::setAssignmentRestriction
File
- src/
Context/ EntityContextDefinition.php, line 125
Class
- EntityContextDefinition
- Extends the core entity context definition class with useful methods.
Namespace
Drupal\rules\ContextCode
public function setAssignmentRestriction($restriction) {
$this->assignmentRestriction = $restriction;
return $this;
}