kartik\grid\SerialColumn::renderDataCell PHP Méthode

renderDataCell() public méthode

public renderDataCell ( $model, $key, $index )
    public function renderDataCell($model, $key, $index)
    {
        $options = $this->fetchContentOptions($model, $key, $index);
        $this->parseExcelFormats($options, $model, $key, $index);
        $out = $this->grid->formatter->format($this->renderDataCellContent($model, $key, $index), $this->format);
        return Html::tag('td', $out, $options);
    }

Usage Example

 /**
  * @inheritdoc
  */
 public function renderDataCell($model, $key, $index)
 {
     if (!$this->_isContextMenu) {
         return parent::renderDataCell($model, $key, $index);
     } else {
         $options = $this->fetchContentOptions($model, $key, $index);
         $this->parseExcelFormats($options, $model, $key, $index);
         $out = $this->renderDataCellContent($model, $key, $index);
         return Html::tag('td', $out, $options);
     }
 }