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

renderDetail() public méthode

Renders the markup for the detail form to edit/view the selected tree node
public renderDetail ( ) : string
Résultat string
    public function renderDetail()
    {
        /**
         * @var Tree $modelClass
         */
        $modelClass = $this->query->modelClass;
        $node = $modelClass::findOne($this->displayValue);
        if (empty($node)) {
            $msg = Html::tag('div', $this->emptyNodeMsg, $this->emptyNodeMsgOptions);
            return Html::tag('div', $msg, $this->detailOptions);
        }
        $iconTypeAttribute = ArrayHelper::getValue($this->_module->dataStructure, 'iconTypeAttribute', 'icon_type');
        if ($this->_iconsList !== false) {
            $node->{$iconTypeAttribute} = ArrayHelper::getValue($this->iconEditSettings, 'type', self::ICON_CSS);
        }
        $params = $this->_module->treeStructure + $this->_module->dataStructure + ['node' => $node, 'action' => $this->nodeActions[Module::NODE_SAVE], 'formOptions' => $this->nodeFormOptions, 'modelClass' => $modelClass, 'currUrl' => Yii::$app->request->url, 'isAdmin' => $this->isAdmin, 'iconsList' => $this->_iconsList, 'softDelete' => $this->softDelete, 'showFormButtons' => $this->showFormButtons, 'showIDAttribute' => $this->showIDAttribute, 'nodeView' => $this->nodeView, 'nodeAddlViews' => $this->nodeAddlViews, 'nodeSelected' => $this->_nodeSelected, 'breadcrumbs' => $this->breadcrumbs];
        $content = $this->render($this->nodeView, ['params' => $params]);
        return Html::tag('div', $content, $this->detailOptions);
    }