Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
StructureManager.php
Go to the documentation of this file.
1 <?php
8 
11 
22 {
33  public function removeElement(
34  ScheduledStructure $scheduledStructure,
35  Structure $structure,
37  $isChild = false
38  ) {
39  $elementsToRemove = array_keys($structure->getChildren($elementName));
40  $scheduledStructure->unsetElement($elementName);
41  foreach ($elementsToRemove as $element) {
42  $this->removeElement($scheduledStructure, $structure, $element, true);
43  }
44  if (!$isChild) {
45  $structure->unsetElement($elementName);
46  }
47  return true;
48  }
49 }
removeElement(ScheduledStructure $scheduledStructure, Structure $structure, $elementName, $isChild=false)
$elementName
Definition: gallery.phtml:10
$element
Definition: element.phtml:12