You are here

public function Context::setDescription in Context 8.4

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

Set the context description.

Parameters

string $description: The new description to set.

Return value

$this This Context object.

Overrides ContextInterface::setDescription

File

src/Entity/Context.php, line 194

Class

Context
Defines the Context entity.

Namespace

Drupal\context\Entity

Code

public function setDescription($description) {
  if (!is_string($description)) {
    throw new InvalidArgumentException('The context description must be a string.');
  }
  $this->description = $description;
  return $this;
}