Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Block.php

function Block::setWeight

Overrides BlockInterface::setWeight

1 call to Block::setWeight()
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 330

Class

Block
Defines a Block configuration entity class.

Namespace

Drupal\block\Entity

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal