kartik\tree\TreeView::getIconsList PHP Méthode

getIconsList() protected méthode

Renders the markup for the detail form to edit/view the selected tree node
protected getIconsList ( ) : string
Résultat string
    protected function getIconsList()
    {
        $show = ArrayHelper::getValue($this->iconEditSettings, 'show', 'text');
        if ($show != 'list') {
            return $show;
        }
        $type = ArrayHelper::getValue($this->iconEditSettings, 'type', self::ICON_CSS);
        $settings = ArrayHelper::getValue($this->iconEditSettings, 'listData', []);
        if ($type === self::ICON_RAW) {
            return $settings;
        }
        $newSettings = ['' => '<em>' . Yii::t('kvtree', 'Default') . '</em> ( ' . Html::tag('span', $this->defaultParentNodeIcon, $this->parentNodeIconOptions) . ' / ' . Html::tag('span', $this->defaultParentNodeOpenIcon, $this->parentNodeIconOptions) . ' / ' . Html::tag('span', $this->defaultChildNodeIcon, $this->childNodeIconOptions) . ')'];
        foreach ($settings as $suffix => $label) {
            $newSettings[$suffix] = Html::tag('span', '', ['class' => $this->_iconPrefix . $suffix]) . ' ' . $label;
        }
        return $newSettings;
    }