function SectionComponent::getWeight
Same name in other branches
- 9 core/modules/layout_builder/src/SectionComponent.php \Drupal\layout_builder\SectionComponent::getWeight()
- 8.9.x core/modules/layout_builder/src/SectionComponent.php \Drupal\layout_builder\SectionComponent::getWeight()
- 10 core/modules/layout_builder/src/SectionComponent.php \Drupal\layout_builder\SectionComponent::getWeight()
Gets the weight of the component.
Return value
int The zero-based weight of the component.
Throws
\UnexpectedValueException Thrown if the weight was never set.
1 call to SectionComponent::getWeight()
- SectionComponent::toArray in core/
modules/ layout_builder/ src/ SectionComponent.php - Returns an array representation of the section component.
File
-
core/
modules/ layout_builder/ src/ SectionComponent.php, line 167
Class
- SectionComponent
- Provides a value object for a section component.
Namespace
Drupal\layout_builderCode
public function getWeight() {
return $this->weight;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.