public function Context::setLabel in Context 8
Same name and namespace in other branches
- 8.4 src/Entity/Context.php \Drupal\context\Entity\Context::setLabel()
- 8.0 src/Entity/Context.php \Drupal\context\Entity\Context::setLabel()
Set the context label.
Parameters
string $label:
Return value
$this
Overrides ContextInterface::setLabel
File
- src/Entity/ Context.php, line 170 
Class
- Context
- Defines the Context entity.
Namespace
Drupal\context\EntityCode
public function setLabel($label) {
  if (!is_string($label)) {
    throw new InvalidArgumentException('The context label must be a string.');
  }
  $this->label = $label;
  return $this;
}