lib/components/types/Module.php
public function widgets()
    {
        $widgets = [];

        $detailsWidget = $this->getDetailsWidget();
        if ($detailsWidget) {
            $id = '_' . $this->systemId . 'Details';
            $widgets[$id] = $detailsWidget;
        }

        $detailListClassName = self::classNamespace() . '\widgets\\' . 'DetailList';
        $simpleListClassName = self::classNamespace() . '\widgets\\' . 'SimpleLinkList';
        @class_exists($detailListClassName);
        @class_exists($simpleListClassName);

        $baseWidget = [];
        if ($this->module instanceof \cascade\components\section\Module) {
            $baseWidget['section'] = $this->module->collectorItem;
        }

        if (!$this->isChildless) {
            if (!class_exists($detailListClassName, false)) {
                $detailListClassName = false;
            }
            if (!class_exists($simpleListClassName, false)) {
                $simpleListClassName = false;
            }
            // needs widget for children and summary page
            if ($detailListClassName) {
                $childrenWidget = $baseWidget;
                $id = 'Parent' . $this->systemId . 'Browse';
                $childrenWidget['widget'] = [
                    'class' => $detailListClassName,
                    'icon' => $this->icon,
                    'title' => '%%relationship%% %%type.' . $this->systemId . '.title.upperPlural%%',
                ];
                $childrenWidget['locations'] = ['child_objects'];
                $childrenWidget['priority'] = $this->priority;
                $childrenWidget['section'] = Yii::$app->collectors['sections']->getOne('_parents');
                $widgets[$id] = $childrenWidget;
            } else {
                Yii::trace("Warning: There is no browse class for the child objects of {$this->systemId}");
            }
            if ($this->hasDashboard && $simpleListClassName) {
                $summaryWidget = $baseWidget;
                $id = $this->systemId . 'Summary';
                $summaryWidget['widget'] = [
                    'class' => $simpleListClassName,
                    'icon' => $this->icon,
                    'title' => '%%type.' . $this->systemId . '.title.upperPlural%%',
                ];
                $summaryWidget['locations'] = ['front'];
                $summaryWidget['priority'] = $this->priority;
                $widgets[$id] = $summaryWidget;
            } else {
                Yii::trace("Warning: There is no summary class for {$this->systemId}");
            }
        } else {
            if (!class_exists($detailListClassName, false)) {
                $detailListClassName = false;
            }
            // needs widget for parents
        }
        if ($detailListClassName) {
            $parentsWidget = $baseWidget;
            $id = 'Children' . $this->systemId . 'Browse';
            $parentsWidget['widget'] = [
                    'class' => $detailListClassName,
                    'icon' => $this->icon,
                    'title' => '%%relationship%% %%type.' . $this->systemId . '.title.upperPlural%%',
                ];
            $parentsWidget['locations'] = ['parent_objects'];
            $parentsWidget['priority'] = $this->priority + 1;
            $widgets[$id] = $parentsWidget;
        } else {
            Yii::trace("Warning: There is no browse class for the parent objects of {$this->systemId}");
        }

        return $widgets;
    }
public function widgets()
    {
        $widgets = [];

        $detailsWidget = $this->getDetailsWidget();
        if ($detailsWidget) {
            $id = '_' . $this->systemId . 'Details';
            $widgets[$id] = $detailsWidget;
        }

        $detailListClassName = self::classNamespace() . '\widgets\\' . 'DetailList';
        $simpleListClassName = self::classNamespace() . '\widgets\\' . 'SimpleLinkList';
        @class_exists($detailListClassName);
        @class_exists($simpleListClassName);

        $baseWidget = [];
        if ($this->module instanceof \cascade\components\section\Module) {
            $baseWidget['section'] = $this->module->collectorItem;
        }

        if (!$this->isChildless) {
            if (!class_exists($detailListClassName, false)) {
                $detailListClassName = false;
            }
            if (!class_exists($simpleListClassName, false)) {
                $simpleListClassName = false;
            }
            // needs widget for children and summary page
            if ($detailListClassName) {
                $childrenWidget = $baseWidget;
                $id = 'Parent' . $this->systemId . 'Browse';
                $childrenWidget['widget'] = [
                    'class' => $detailListClassName,
                    'icon' => $this->icon,
                    'title' => '%%relationship%% %%type.' . $this->systemId . '.title.upperPlural%%',
                ];
                $childrenWidget['locations'] = ['child_objects'];
                $childrenWidget['priority'] = $this->priority;
                $childrenWidget['section'] = Yii::$app->collectors['sections']->getOne('_parents');
                $widgets[$id] = $childrenWidget;
            } else {
                Yii::trace("Warning: There is no browse class for the child objects of {$this->systemId}");
            }
            if ($this->hasDashboard && $simpleListClassName) {
                $summaryWidget = $baseWidget;
                $id = $this->systemId . 'Summary';
                $summaryWidget['widget'] = [
                    'class' => $simpleListClassName,
                    'icon' => $this->icon,
                    'title' => '%%type.' . $this->systemId . '.title.upperPlural%%',
                ];
                $summaryWidget['locations'] = ['front'];
                $summaryWidget['priority'] = $this->priority;
                $widgets[$id] = $summaryWidget;
            } else {
                Yii::trace("Warning: There is no summary class for {$this->systemId}");
            }
        } else {
            if (!class_exists($detailListClassName, false)) {
                $detailListClassName = false;
            }
            // needs widget for parents
        }
        if ($detailListClassName) {
            $parentsWidget = $baseWidget;
            $id = 'Children' . $this->systemId . 'Browse';
            $parentsWidget['widget'] = [
                    'class' => $detailListClassName,
                    'icon' => $this->icon,
                    'title' => '%%relationship%% %%type.' . $this->systemId . '.title.upperPlural%%',
                ];
            $parentsWidget['locations'] = ['parent_objects'];
            $parentsWidget['priority'] = $this->priority + 1;
            $widgets[$id] = $parentsWidget;
        } else {
            Yii::trace("Warning: There is no browse class for the parent objects of {$this->systemId}");
        }

        return $widgets;
    }
public function widgets ( ) { $ widgets = [ ] ; $ detailsWidget = $ this -> getDetailsWidget ( ) ; if ( $ detailsWidget ) { $ id = '_' . $ this -> systemId . 'Details' ; $ widgets [ $ id ] = $ detailsWidget ; } $ detailListClassName = self :: classNamespace ( ) . '\widgets\\' . 'DetailList' ; $ simpleListClassName = self :: classNamespace ( ) . '\widgets\\' . 'SimpleLinkList' ; @ class_exists ( $ detailListClassName ) ; @ class_exists ( $ simpleListClassName ) ; $ baseWidget = [ ] ; if ( $ this -> module instanceof \ cascade \ components \ section \ Module ) { $ baseWidget [ 'section' ] = $ this -> module -> collectorItem ; } if ( ! $ this -> isChildless ) { if ( ! class_exists ( $ detailListClassName , false ) ) { $ detailListClassName = false ; } if ( ! class_exists ( $ simpleListClassName , false ) ) { $ simpleListClassName = false ; } // needs widget for children and summary page if ( $ detailListClassName ) { $ childrenWidget = $ baseWidget ; $ id = 'Parent' . $ this -> systemId . 'Browse' ; $ childrenWidget [ 'widget' ] = [ 'class' => $ detailListClassName , 'icon' => $ this -> icon , 'title' => '%%relationship%% %%type.' . $ this -> systemId . '.title.upperPlural%%' , ] ; $ childrenWidget [ 'locations' ] = [ 'child_objects' ] ; $ childrenWidget [ 'priority' ] = $ this -> priority ; $ childrenWidget [ 'section' ] = Yii :: $ app -> collectors [ 'sections' ] -> getOne ( '_parents' ) ; $ widgets [ $ id ] = $ childrenWidget ; } else { Yii :: trace ( "Warning: There is no browse class for the child objects of {$this->systemId}" ) ; } if ( $ this -> hasDashboard && $ simpleListClassName ) { $ summaryWidget = $ baseWidget ; $ id = $ this -> systemId . 'Summary' ; $ summaryWidget [ 'widget' ] = [ 'class' => $ simpleListClassName , 'icon' => $ this -> icon , 'title' => '%%type.' . $ this -> systemId . '.title.upperPlural%%' , ] ; $ summaryWidget [ 'locations' ] = [ 'front' ] ; $ summaryWidget [ 'priority' ] = $ this -> priority ; $ widgets [ $ id ] = $ summaryWidget ; } else { Yii :: trace ( "Warning: There is no summary class for {$this->systemId}" ) ; } } else { if ( ! class_exists ( $ detailListClassName , false ) ) { $ detailListClassName = false ; } // needs widget for parents } if ( $ detailListClassName ) { $ parentsWidget = $ baseWidget ; $ id = 'Children' . $ this -> systemId . 'Browse' ; $ parentsWidget [ 'widget' ] = [ 'class' => $ detailListClassName , 'icon' => $ this -> icon , 'title' => '%%relationship%% %%type.' . $ this -> systemId . '.title.upperPlural%%' , ] ; $ parentsWidget [ 'locations' ] = [ 'parent_objects' ] ; $ parentsWidget [ 'priority' ] = $ this -> priority + 1 ; $ widgets [ $ id ] = $ parentsWidget ; } else { Yii :: trace ( "Warning: There is no browse class for the parent objects of {$this->systemId}" ) ; } return $ widgets ; }
[[@doctodo method_description:widgets]].

@return [[@doctodo return_type:widgets]] [[@doctodo return_description:widgets]]
[[ @doctodo method_description : widgets ]] .