public function Block::setWeight in Drupal 8
Same name and namespace in other branches
- 9 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block::setWeight()
- 10 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block::setWeight()
Sets the block weight.
Parameters
int $weight: The desired weight.
Return value
$this
Overrides BlockInterface::setWeight
File
- core/
modules/ block/ src/ Entity/ Block.php, line 321
Class
- Block
- Defines a Block configuration entity class.
Namespace
Drupal\block\EntityCode
public function setWeight($weight) {
$this->weight = $weight;
return $this;
}