You are here

public function Context::setDescription in Context 8.0

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

Set the context description.

Parameters

string $description:

Return value

$this

Overrides ContextInterface::setDescription

File

src/Entity/Context.php, line 189

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;
}