You are here

public function Context::setGroup in Context 8.0

Same name and namespace in other branches
  1. 8.4 src/Entity/Context.php \Drupal\context\Entity\Context::setGroup()
  2. 8 src/Entity/Context.php \Drupal\context\Entity\Context::setGroup()

Set the group this context should belong to.

Parameters

null|string $group:

Return value

$this

Overrides ContextInterface::setGroup

File

src/Entity/Context.php, line 210

Class

Context
Defines the Context entity.

Namespace

Drupal\context\Entity

Code

public function setGroup($group) {
  $this->group = is_string($group) && !empty($group) ? $group : self::CONTEXT_GROUP_NONE;
  return $this;
}