Ejemplo n.º 1
0
 /**
  * Renders the data cell content.
  * This method evaluates {@link dataExpression} or {@link dataField} and renders the result.
  * @param integer the row number (zero-based)
  * @param mixed the data associated with the row
  */
 protected function renderDataCellContent($row, $data)
 {
     if ($this->dataExpression !== null) {
         echo $this->evaluateExpression($this->dataExpression, array('data' => $data, 'row' => $row));
     } else {
         if ($this->dataField !== null) {
             $value = CHtml::value($data, $this->dataField);
             if ($this->encodeData === true) {
                 $value = CHtml::encode($value);
             }
             echo $value;
         } else {
             parent::renderDataCellContent($row, $data);
         }
     }
 }