public function Context::setGroup in Context 8.4
Same name and namespace in other branches
- 8 src/Entity/Context.php \Drupal\context\Entity\Context::setGroup()
- 8.0 src/Entity/Context.php \Drupal\context\Entity\Context::setGroup()
Set the group this context should belong to.
Parameters
null|string $group: The name of the group to set.
Return value
$this This Context object.
Overrides ContextInterface::setGroup
File
- src/
Entity/ Context.php, line 215
Class
- Context
- Defines the Context entity.
Namespace
Drupal\context\EntityCode
public function setGroup($group) {
$this->group = is_string($group) && !empty($group) ? $group : self::CONTEXT_GROUP_NONE;
return $this;
}