/** * Renders the data cell content. * @param integer $row the row number (zero-based). * @param mixed $data the data associated with the row. */ protected function renderDataCellContent($row, $data) { /* @var $am CAuthManager|AuthBehavior */ $am = Yii::app()->getAuthManager(); $labelType = $this->active || $am->hasParent($this->itemName, $data['name']) || $am->hasChild($this->itemName, $data['name']) ? 'info' : ''; /* @var $controller AuthItemController */ $controller = $this->grid->getController(); echo BsHtml::labelBs($controller->getItemTypeText($data['item']->type), array('color' => $labelType)); }