lib/components/types/Item.php
public function getSections()
    {
        if (!is_null($this->_sections)) {
            return $this->_sections;
        }
        $this->_sections = [];
        foreach ($this->_children as $rel) {
            if (!$rel->active) {
                continue;
            }
            // if ($rel->isHasOne()) { continue; }
            $child = $rel->child;
            $instanceSettings = ['relationship' => $rel, 'queryRole' => 'children'];
            $items = Yii::$app->collectors['widgets']->getLocation('parent_objects', $child);
            foreach ($items as $item) {
                $widgetObject = $item->object;
                $item->settings = $instanceSettings;
                $section = $item->getSection($widgetObject, $instanceSettings);
                if (empty($section)) {
                    continue;
                }
                if (!isset($this->_sections[$item->section->systemId])) {
                    $this->_sections[$section->systemId] = $section;
                }
                $this->_sections[$section->systemId]->register($this, $item);
            }
        }

        foreach ($this->_parents as $rel) {
            if (!$rel->active) {
                continue;
            }
            if ($rel->isHasOne()) {
                continue;
            }
            $parent = $rel->parent;
            $instanceSettings = ['relationship' => $rel, 'queryRole' => 'parents'];
            $items = Yii::$app->collectors['widgets']->getLocation('child_objects', $parent);
            foreach ($items as $item) {
                $item->settings = $instanceSettings;
                $section = $item->getSection($this->object);
                if (empty($section)) {
                    continue;
                }
                if (!isset($this->_sections[$item->section->systemId])) {
                    $this->_sections[$section->systemId] = $section;
                }
                $this->_sections[$section->systemId]->register($this, $item);
            }
        }
        $items = Yii::$app->collectors['widgets']->getLocation('self',  $this->object);
        foreach ($items as $item) {
            $item->settings = $instanceSettings;
            $section = $item->getSection($this->object);
            if (empty($section)) {
                continue;
            }
            if (!isset($this->_sections[$item->section->systemId])) {
                $this->_sections[$section->systemId] = $section;
            }
            $this->_sections[$section->systemId]->register($this, $item);
        }

        ArrayHelper::multisort($this->_sections, ['priority', 'sectionTitle'], [SORT_ASC, SORT_ASC]);

        return $this->_sections;
    }
public function getSections()
    {
        if (!is_null($this->_sections)) {
            return $this->_sections;
        }
        $this->_sections = [];
        foreach ($this->_children as $rel) {
            if (!$rel->active) {
                continue;
            }
            // if ($rel->isHasOne()) { continue; }
            $child = $rel->child;
            $instanceSettings = ['relationship' => $rel, 'queryRole' => 'children'];
            $items = Yii::$app->collectors['widgets']->getLocation('parent_objects', $child);
            foreach ($items as $item) {
                $widgetObject = $item->object;
                $item->settings = $instanceSettings;
                $section = $item->getSection($widgetObject, $instanceSettings);
                if (empty($section)) {
                    continue;
                }
                if (!isset($this->_sections[$item->section->systemId])) {
                    $this->_sections[$section->systemId] = $section;
                }
                $this->_sections[$section->systemId]->register($this, $item);
            }
        }

        foreach ($this->_parents as $rel) {
            if (!$rel->active) {
                continue;
            }
            if ($rel->isHasOne()) {
                continue;
            }
            $parent = $rel->parent;
            $instanceSettings = ['relationship' => $rel, 'queryRole' => 'parents'];
            $items = Yii::$app->collectors['widgets']->getLocation('child_objects', $parent);
            foreach ($items as $item) {
                $item->settings = $instanceSettings;
                $section = $item->getSection($this->object);
                if (empty($section)) {
                    continue;
                }
                if (!isset($this->_sections[$item->section->systemId])) {
                    $this->_sections[$section->systemId] = $section;
                }
                $this->_sections[$section->systemId]->register($this, $item);
            }
        }
        $items = Yii::$app->collectors['widgets']->getLocation('self',  $this->object);
        foreach ($items as $item) {
            $item->settings = $instanceSettings;
            $section = $item->getSection($this->object);
            if (empty($section)) {
                continue;
            }
            if (!isset($this->_sections[$item->section->systemId])) {
                $this->_sections[$section->systemId] = $section;
            }
            $this->_sections[$section->systemId]->register($this, $item);
        }

        ArrayHelper::multisort($this->_sections, ['priority', 'sectionTitle'], [SORT_ASC, SORT_ASC]);

        return $this->_sections;
    }
Get sections.

@return unknown