Block::setWeight

public Block::setWeight($weight) 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 311 Class Block Defines a Block configuration entity class. Namespace Drupal\block\Entity Code public function setWeight($weight) { $this->weight = $weight; return $this; }

Block::setRegion

public Block::setRegion($region) Sets the region this block is placed in. Parameters string $region: The region to place this block in. Return value $this Overrides BlockInterface::setRegion File core/modules/block/src/Entity/Block.php, line 303 Class Block Defines a Block configuration entity class. Namespace Drupal\block\Entity Code public function setRegion($region) { $this->region = $region; return $this; }

Block::setVisibilityConfig

public Block::setVisibilityConfig($instance_id, array $configuration) Sets the visibility condition configuration. Parameters string $instance_id: The condition instance ID. array $configuration: The condition configuration. Return value $this Overrides BlockInterface::setVisibilityConfig File core/modules/block/src/Entity/Block.php, line 258 Class Block Defines a Block configuration entity class. Namespace Drupal\block\Entity Code public function setVisibilityConfig($instance_id, ar

Block::sort

public static Block::sort(ConfigEntityInterface $a, ConfigEntityInterface $b) Sorts active blocks by weight; sorts inactive blocks by name. Overrides ConfigEntityBase::sort File core/modules/block/src/Entity/Block.php, line 206 Class Block Defines a Block configuration entity class. Namespace Drupal\block\Entity Code public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) { // Separate enabled from disabled. $status = (int) $b->status() - (int) $a->sta

Block::label

public Block::label() Gets the label of the entity. Return value string|null The label of the entity, or NULL if there is no label defined. Overrides Entity::label File core/modules/block/src/Entity/Block.php, line 192 Class Block Defines a Block configuration entity class. Namespace Drupal\block\Entity Code public function label() { $settings = $this->get('settings'); if ($settings['label']) { return $settings['label']; } else { $definition = $this->getPlugin()-

Block::getVisibility

public Block::getVisibility() Returns an array of visibility condition configurations. Return value array An array of visibility condition configuration keyed by the condition ID. Overrides BlockInterface::getVisibility File core/modules/block/src/Entity/Block.php, line 251 Class Block Defines a Block configuration entity class. Namespace Drupal\block\Entity Code public function getVisibility() { return $this->getVisibilityConditions()->getConfiguration(); }

Block::getVisibilityConditions

public Block::getVisibilityConditions() Gets conditions for this block. Return value \Drupal\Core\Condition\ConditionInterface[]|\Drupal\Core\Condition\ConditionPluginCollection An array or collection of configured condition plugins. Overrides BlockInterface::getVisibilityConditions File core/modules/block/src/Entity/Block.php, line 273 Class Block Defines a Block configuration entity class. Namespace Drupal\block\Entity Code public function getVisibilityConditions() { if (!isset($t

Block::getVisibilityCondition

public Block::getVisibilityCondition($instance_id) Gets a visibility condition plugin instance. Parameters string $instance_id: The condition plugin instance ID. Return value \Drupal\Core\Condition\ConditionInterface A condition plugin. Overrides BlockInterface::getVisibilityCondition File core/modules/block/src/Entity/Block.php, line 283 Class Block Defines a Block configuration entity class. Namespace Drupal\block\Entity Code public function getVisibilityCondition($instance_id) {

Block::postSave

public Block::postSave(EntityStorageInterface $storage, $update = TRUE) Acts on a saved entity before the insert or update hook is invoked. Used after the entity is saved, but before invoking the insert or update hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed. Parameters \Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object. bool $upd

Block::getWeight

public Block::getWeight() Returns the weight of this block (used for sorting). Return value int The block weight. Overrides BlockInterface::getWeight File core/modules/block/src/Entity/Block.php, line 185 Class Block Defines a Block configuration entity class. Namespace Drupal\block\Entity Code public function getWeight() { return $this->weight; }