You are here

public function Block::setRegion in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block::setRegion()
  2. 9 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block::setRegion()

Sets the region this block is placed in.

Parameters

string $region: The region to place this block in.

Return value

$this

Overrides BlockInterface::setRegion

1 call to Block::setRegion()
Block::preSave in core/modules/block/src/Entity/Block.php
Acts on an entity before the presave hook is invoked.

File

core/modules/block/src/Entity/Block.php, line 313

Class

Block
Defines a Block configuration entity class.

Namespace

Drupal\block\Entity

Code

public function setRegion($region) {
  $this->region = $region;
  return $this;
}