public function SectionListTrait::count in Drupal 9
Same name and namespace in other branches
- 10 core/modules/layout_builder/src/SectionListTrait.php \Drupal\layout_builder\SectionListTrait::count()
1 call to SectionListTrait::count()
- SectionListTrait::appendSection in core/
modules/ layout_builder/ src/ SectionListTrait.php
File
- core/
modules/ layout_builder/ src/ SectionListTrait.php, line 28
Class
- SectionListTrait
- Provides a trait for maintaining a list of sections.
Namespace
Drupal\layout_builderCode
public function count() {
if ($this
->hasBlankSection()) {
return 0;
}
return count($this
->getSections());
}