You are here

public function SectionStorageTrait::count in Drupal 8

1 call to SectionStorageTrait::count()
SectionStorageTrait::appendSection in core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php

File

core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php, line 28

Class

SectionStorageTrait
Provides a trait for storing sections on an object.

Namespace

Drupal\layout_builder\SectionStorage

Code

public function count() {
  if ($this
    ->hasBlankSection()) {
    return 0;
  }
  return count($this
    ->getSections());
}