You are here

public function Context::setWeight in Context 8

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

Set the weight for this context.

Parameters

int $weight: The weight to set for this context.

Return value

$this

Overrides ContextInterface::setWeight

File

src/Entity/Context.php, line 228

Class

Context
Defines the Context entity.

Namespace

Drupal\context\Entity

Code

public function setWeight($weight) {
  $this->weight = (int) $weight;
  return $this;
}