Renders the data cell content.
@param integer $row the row number (zero-based).
@param mixed $data the data associated with the row.
960287
protected function renderDataCellContent($row, $data)
    {
        echo CHtml::link(CHtml::value($data, $this->nameColumn), array('view', 'id' => $data->{$this->idColumn}));
    }
1334819
public function renderDataCell($row)
	{
		if ($this->grid->json) {
            $data = $this->grid->dataProvider->data[$row];
            $options = $this->htmlOptions;
            if ($this->cssClassExpression !== null) {
                $class = $this->evaluateExpression($this->cssClassExpression, array('row' => $row, 'data' => $data));
                if (!empty($class)) {
                    if (isset($options['class'])) {
                        $options['class'] .= ' ' . $class;
                    } else {
                        $options['class'] = $class;
                    }
                }
            }

            return array(
                'attrs' => CHtml::renderAttributes($options),
                'content' => $this->renderDataCellContent($row, $data),
            );
		}

		parent::renderDataCell($row);
	}
357993
public function render(Row $row)
	{
		/**
		 * Renderer function may be used
		 */
		try {
			return $this->useRenderer($row);
		} catch (DataGridColumnRendererException $e) {
			/**
			 * Do not use renderer
			 */
		}

		$value = parent::render($row);

		if (!$value && !$this->icon) {
			return null;
		}

		$a = Html::el('a')
			->href($this->createLink(
				$this->grid,
				$this->href,
				$this->getItemParams($row, $this->params) + $this->parameters
			));

		if (!empty($this->data_attributes)) {
			foreach ($this->data_attributes as $key => $attr_value) {
				$a->data($key, $attr_value);
			}
		}

		if ($this->open_in_new_tab) {
			$a->addAttributes(['target' => '_blank']);
		}

		if ($this->title) {
			$a->title($this->title);
		}
		if ($this->class) {
			$a->class($this->class);
		}

		$element = $a;

		if ($this->icon) {
			$a->addHtml(Html::el('span')->class(DataGrid::$icon_prefix . $this->icon));

			if (strlen($value)) {
				$a->addHtml('&nbsp;');
			}
		}

		if ($this->isTemplateEscaped()) {
			$a->addText($value);
		} else {
			$a->addHtml($value);
		}

		return $element;
	}
1050898
public function getDataCellContent($row)
	{
		$data=$this->grid->dataProvider->data[$row];
		if($this->urlExpression!==null)
			$url=$this->evaluateExpression($this->urlExpression,array('data'=>$data,'row'=>$row));
		else
			$url=$this->url;
		if($this->labelExpression!==null)
			$label=$this->evaluateExpression($this->labelExpression,array('data'=>$data,'row'=>$row));
		else
			$label=$this->label;
		$options=$this->linkHtmlOptions;
		if(is_string($this->imageUrl))
			return CHtml::link(CHtml::image($this->imageUrl,$label),$url,$options);
		else
			return CHtml::link($label,$url,$options);
	}
860713
public static function rowcol( $row = 1, $col = 1 ) {
		$row = intval($row);
		$col = intval($col);
		if( $row < 0 ) {
			$row = Misc::rows() + $row + 1;
		}
		if( $col < 0 ) {
			$col = Misc::cols() + $col + 1;
		}
		fwrite(self::$stream, "\033[{$row};{$col}f");
	}
785896
public function beforeInsert(Row $row): void
    {
        foreach ($row->values() as $column => $value) {
            $this->generateFakeDataIfNeeded($row, $column, $value);
        }
    }
329030
protected function onInput($row)
    {
        if (is_array($this->params)) {
            foreach ($this->params as $cName => $cMap) {
                if (isset($this->mapFuncs[$cName])) {
                    $row[$cName] = $this->mapFuncs[$cName]($row[$cName]);
                } else if (is_array($cMap)) {
                    $row[$cName] = Utility::get($cMap, $row[$cName], $row[$cName]);
                }

            }
        } else if (is_callable($this->params)) {
            $func = $this->params;
            $pos = 0;
            foreach ($row as $cName => $value) {
                $row[$cName] = $func($value, $cName, $this->metaData['columns'][$cName], $pos);
                $pos++;
            }
        }
        $this->next($row);
    }
424572
public function display($data)
    {
        if (!$this->visible) {
            return;
        }

        $this->setupRenderers($data);
        $this->displayRenderers($data);
    }
927312
public function renderRows()
    {
        $this->odd_even = null;
        $this->total_rows = 0;
        $this->template->del($this->container_tag);

        // render data rows
        $iter = $this->getIterator();
        foreach ($iter as $this->current_id => $this->current_row) {
            if ($this->current_row instanceof Model || $this->current_row instanceof \atk4\data\Model) {
                $this->current_row = (array) $this->current_row->get();
            } elseif (!is_array($this->current_row) && !($this->current_row instanceof ArrayAccess)) {
                // Looks like we won't be abel to access current_row as array, so we will
                // copy it's value inside $this->current instead and produce an empty array
                // to be filled out by a custom iterators
                $this->current = $this->current_row;
                $this->current_row = get_object_vars($this->current);
            }

            $this->current_row_html = array();

            if (!empty($this->sep_html) && $this->total_rows) {
                $this->renderSeparator();
            }

            // calculate rows so far
            ++$this->total_rows;

            // if onRender totals enabled, then update totals
            if ($this->totals_type == 'onRender') {
                $this->updateTotals();
            }

            // render data row
            $this->renderDataRow();
        }

        // calculate grand totals if needed
        if ($this->totals_type == 'onRequest') {
            $this->updateGrandTotals();
        }

        // set total row count
        $this->totals['row_count'] = $this->total_rows;

        // render totals row
        $this->renderTotalsRow();
    }
1202328
public function renderDataCellContent($row, $data)
    {
        $isModel = $data instanceOf CModel;
        
        if($isModel) {
            $widgetClass = 'TbEditableField';
            $options = array(
                'model'        => $data,
                'attribute'    => empty($this->editable['attribute']) ? $this->name : $this->editable['attribute'],
            );
            
            //if value defined in column config --> we should evaluate it 
            //and pass to widget via `text` option: set flag `passText` = true 
            $passText = !empty($this->value);     
        } else {
            $widgetClass = 'TbEditable';
            $options = array(
                'pk'           => $data[$this->grid->dataProvider->keyField],
                'name'         => empty($this->editable['name']) ? $this->name : $this->editable['name'],
            );
            
            $passText = true;
            //if autotext will be applied, do not pass `text` option (pass `value` instead)
            if(empty($this->value) && TbEditable::isAutotext($this->editable, isset($this->editable['type']) ? $this->editable['type'] : '')) {
               $options['value'] = $data[$this->name]; 
               $passText = false;
            } 
        }
        
        //for live update
        $options['liveTarget'] = $this->grid->id;
        
        $options = CMap::mergeArray($this->editable, $options);

        //if value defined for column --> use it as element text
        if($passText) {
            ob_start();
            parent::renderDataCellContent($row, $data);
            $text = ob_get_clean();
            $options['text'] = $text;
            $options['encode'] = false;
        }
        
        //apply may be a string expression, see https://github.com/vitalets/x-editable-yii/issues/33
        if (isset($options['apply']) && is_string($options['apply'])) {
            $options['apply'] = $this->evaluateExpression($options['apply'], array('data'=>$data, 'row'=>$row));
        }

        //evaluate htmlOptions inside editable config as they can depend on $data
        //see https://github.com/vitalets/x-editable-yii/issues/40
        if (isset($options['htmlOptions']) && is_array($options['htmlOptions'])) {
            foreach($options['htmlOptions'] as $k => $v) {
                if(is_string($v) && (strpos($v, '$data') !== false || strpos($v, '$row') !== false)) {
                    $options['htmlOptions'][$k] = $this->evaluateExpression($v, array('data'=>$data, 'row'=>$row));
                }
            }
        }           
        
        $this->grid->controller->widget($widgetClass, $options);
    }
655100
public function display($row)
    {
        if (!$this->visible) {
            return;
        }

        $this->setupRenderers($row);
        $this->displayRenderers($row);
    }
729540
public function renderTableRow($row)
	{
		$htmlOptions=array();
		if($this->rowHtmlOptionsExpression!==null)
		{
			$data=$this->dataProvider->data[$row];
			$options=$this->evaluateExpression($this->rowHtmlOptionsExpression,array('row'=>$row,'data'=>$data));
			if(is_array($options))
				$htmlOptions = $options;
		}

		if($this->rowCssClassExpression!==null)
		{
			$data=$this->dataProvider->data[$row];
			$class=$this->evaluateExpression($this->rowCssClassExpression,array('row'=>$row,'data'=>$data));
		}
		elseif(is_array($this->rowCssClass) && ($n=count($this->rowCssClass))>0)
			$class=$this->rowCssClass[$row%$n];

		if(!empty($class))
		{
			if(isset($htmlOptions['class']))
				$htmlOptions['class'].=' '.$class;
			else
				$htmlOptions['class']=$class;
		}

		echo CHtml::openTag('tr', $htmlOptions)."\n";
		foreach($this->columns as $column)
			$this->renderDataCell($column, $row);
		echo "</tr>\n";
	}
629135
protected function renderDataCellContent($row, $data)
	{
		$content = $this->emptyText;
		if ($this->imagePathExpression && $imagePath = $this->evaluateExpression(
			$this->imagePathExpression,
			array('row' => $row, 'data' => $data)
		)
		) {
			$this->imageOptions['src'] = $imagePath;
			$content = CHtml::tag('img', $this->imageOptions);
		} elseif ($this->usePlaceHoldIt && !empty($this->placeHoldItSize)) {
			$content = CHtml::tag(
				'img',
				array('src' => 'http://placehold.it/' . $this->placeHoldItSize)
			);
		} elseif ($this->usePlaceKitten && !empty($this->placeKittenSize)) {
			$content = CHtml::tag('img', array('src' => 'http://placekitten.com/' . $this->placeKittenSize));
		}
		echo $content;
	}
728226
public function getDataCellContent($row)
	{
		$data=$this->grid->dataProvider->data[$row];
		if($this->value!==null)
			$value=$this->evaluateExpression($this->value,array('data'=>$data,'row'=>$row));
		elseif($this->name!==null)
			$value=CHtml::value($data,$this->name);
		return $value===null ? $this->grid->nullDisplay : $this->grid->getFormatter()->format($value,$this->type);
	}
262259
public function renderTableRow($row)
	{
		if ($this->rowCssClassExpression !== null) {
			$data = $this->dataProvider->data[$row];
			echo '<tr class="' . $this->evaluateExpression(
				$this->rowCssClassExpression,
				array('row' => $row, 'data' => $data)
			) . '">';
		} else if (is_array($this->rowCssClass) && ($n = count($this->rowCssClass)) > 0) {
			echo '<tr class="' . $this->rowCssClass[$row % $n] . '">';
		} else {
			echo '<tr>';
		}
		foreach ($this->columns as $column) {
			/** @var CGridColumn $column */
			$column->renderDataCell($row);
		}
		echo "</tr>\n";
	}
318187
public function renderDataCellContent($row, $data)
	{
		if ($this->grid->json) {
			if ($this->value !== null) {
				$value = $this->evaluateExpression($this->value, array('data' => $data, 'row' => $row));
			} elseif ($this->name !== null) {
				$value = CHtml::value($data, $this->name);
			}
			$value = !isset($value)
				? $this->grid->nullDisplay
				: $this->grid->getFormatter()->format(
					$value,
					$this->type
				);

			return $value;
		}
		parent::renderDataCellContent($row, $data);
	}
853177
public function setData($data = array())
    {
        

    	//empty local data
    	$this->rows = array();
    	//fill the local data
		foreach($data as $rowId => $cells){
			if(is_array($cells)){
				$this->addRow($rowId, $cells);
			}else if(is_string($cells)){
				$this->addRow($cells);
			}
		}

        
    }