function SectionStorageTrait::count

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());
}

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