function SectionComponent::setWeight

Same name in other branches
  1. 9 core/modules/layout_builder/src/SectionComponent.php \Drupal\layout_builder\SectionComponent::setWeight()
  2. 8.9.x core/modules/layout_builder/src/SectionComponent.php \Drupal\layout_builder\SectionComponent::setWeight()
  3. 10 core/modules/layout_builder/src/SectionComponent.php \Drupal\layout_builder\SectionComponent::setWeight()

Sets the weight of the component.

Parameters

int $weight: The zero-based weight of the component.

Return value

$this

File

core/modules/layout_builder/src/SectionComponent.php, line 179

Class

SectionComponent
Provides a value object for a section component.

Namespace

Drupal\layout_builder

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.