You are here

public function SectionListInterface::removeAllSections in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/src/SectionListInterface.php \Drupal\layout_builder\SectionListInterface::removeAllSections()

Removes all of the sections.

Parameters

bool $set_blank: (optional) The default implementation of section lists differentiates between a list that has never contained any sections and a list that has purposefully had all sections removed in order to remain blank. Passing TRUE will mirror ::removeSection() by tracking this as a blank list. Passing FALSE will reset the list as though it had never contained any sections at all. Defaults to FALSE.

Return value

$this

1 method overrides SectionListInterface::removeAllSections()
SectionStorageBase::removeAllSections in core/modules/layout_builder/src/Plugin/SectionStorage/SectionStorageBase.php
Removes all of the sections.

File

core/modules/layout_builder/src/SectionListInterface.php, line 82

Class

SectionListInterface
Defines the interface for an object that stores layout sections.

Namespace

Drupal\layout_builder

Code

public function removeAllSections($set_blank = FALSE);