Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SectionConfigConverter.php
Go to the documentation of this file.
1 <?php
7 
9 {
14 
18  public function convert($source)
19  {
20  $sections = [];
21  foreach ($source->getElementsByTagName('action') as $action) {
22  $actionName = strtolower($action->getAttribute('name'));
23  foreach ($action->getElementsByTagName('section') as $section) {
24  $sections[$actionName][] = strtolower($section->getAttribute('name'));
25  }
26  if (!isset($sections[$actionName])) {
27  $sections[$actionName] = self::INVALIDATE_ALL_SECTIONS_MARKER;
28  }
29  }
30  return [
31  'sections' => $sections,
32  ];
33  }
34 }
$source
Definition: source.php:23