Exemplo n.º 1
0
 /**
  * Renders the header cell content. The default implementation simply renders [[header]]. This method may be
  * overridden to customize the rendering of the header cell.
  *
  * @return string the rendering result
  */
 protected function renderHeaderCellContent()
 {
     if ($this->header !== null) {
         return parent::renderHeaderCellContent();
     }
     $icon = $this->expandIcon;
     $css = 'kv-expand-header-icon kv-state-collapsed';
     if ($this->defaultHeaderState === GridView::ROW_EXPANDED) {
         $icon = $this->collapseIcon;
         $css = 'kv-expand-header-icon kv-state-expanded';
     }
     return "<div class='{$css}'>{$icon}</div>";
 }