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

renderToggleIcon() protected méthode

Renders the default toggle icon markup based on fontAwesome setting
protected renderToggleIcon ( string $action = 'collapse' ) : string
$action string whether 'collapse' or 'expand'
Résultat string
    protected function renderToggleIcon($action = 'collapse')
    {
        $icon = $this->_iconPrefix . $this->getToggleIcon($action);
        $options = $action == 'expand' ? $this->expandNodeOptions : $this->collapseNodeOptions;
        $label = ArrayHelper::remove($options, 'label', '<span class="' . $icon . '"></span>');
        return Html::tag('span', $label, ['class' => "kv-node-{$action}"]);
    }