Get value of column.

@param  mixed  $row
@param  array  $templates

@return string
551181
public function getField($row, array $templates = []): string
    {
        $value = $this->attributes['field']($row, $this, $templates);

        if ($value instanceof Renderable) {
            return $value->render();
        }

        return $value;
    }
247687
public function findFirst(array $templates, $type)
    {
        $found = '';
        while (!empty($templates) && $found === '') {
            $found = $this->find(array_shift($templates), $type) ?: '';
        }

        return $found;
    }
560752
public function getColumnFromRow($row, Table $table)
    {
        $name = $row['Field'];
        $is_nullable = ($row['Null'] == 'YES');
        $autoincrement = (strpos($row['Extra'], 'auto_increment') !== false);
        $size = null;
        $precision = null;
        $scale = null;
        $sqlType = false;
        $desc = $row['Comment'];

        $regexp = '/^
            (\w+)        # column type [1]
            [\(]         # (
                ?([\d,]*)  # size or size, precision [2]
            [\)]         # )
            ?\s*         # whitespace
            (\w*)        # extra description (UNSIGNED, CHARACTER SET, ...) [3]
        $/x';
        if (preg_match($regexp, $row['Type'], $matches)) {
            $nativeType = $matches[1];
            if ($matches[2]) {
                if (($cpos = strpos($matches[2], ',')) !== false) {
                    $size = (int) substr($matches[2], 0, $cpos);
                    $precision = $size;
                    $scale = (int) substr($matches[2], $cpos + 1);
                } else {
                    $size = (int) $matches[2];
                }
            }
            if ($matches[3]) {
                $sqlType = $row['Type'];
            }
            foreach (self::$defaultTypeSizes as $type => $defaultSize) {
                if ($nativeType == $type && $size == $defaultSize && $scale === null) {
                    $size = null;
                    continue;
                }
            }
        } elseif (preg_match('/^(\w+)\(/', $row['Type'], $matches)) {
            $nativeType = $matches[1];
            if ($nativeType == 'enum') {
                $sqlType = $row['Type'];
            }
        } else {
            $nativeType = $row['Type'];
        }

        //BLOBs can't have any default values in MySQL
        $default = preg_match('~blob|text~', $nativeType) ? null : $row['Default'];

        $propelType = $this->getMappedPropelType($nativeType);
        if (!$propelType) {
            $propelType = Column::DEFAULT_TYPE;
            $sqlType = $row['Type'];
            $this->warn("Column [" . $table->getName() . "." . $name . "] has a column type (" . $nativeType . ") that Propel does not support.");
        }

        // Special case for TINYINT(1) which is a BOOLEAN
        if (PropelTypes::TINYINT === $propelType && 1 === $size) {
            $propelType = PropelTypes::BOOLEAN;
        }

        $column = new Column($name);
        $column->setTable($table);
        $column->setDomainForType($propelType);
        if ($sqlType) {
            $column->getDomain()->replaceSqlType($sqlType);
        }
        $column->getDomain()->replaceSize($size);
        $column->getDomain()->replaceScale($scale);
        if ($default !== null) {
            if ($propelType == PropelTypes::BOOLEAN) {
                if ($default == '1') {
                    $default = 'true';
                }
                if ($default == '0') {
                    $default = 'false';
                }
            }
            if (in_array($default, array('CURRENT_TIMESTAMP'))) {
                $type = ColumnDefaultValue::TYPE_EXPR;
            } else {
                $type = ColumnDefaultValue::TYPE_VALUE;
            }
            $column->getDomain()->setDefaultValue(new ColumnDefaultValue($default, $type));
        }
        $column->setAutoIncrement($autoincrement);
        $column->setNotNull(!$is_nullable);

        if ($this->addVendorInfo) {
            $vi = $this->getNewVendorInfoObject($row);
            $column->addVendorInfo($vi);
        }

        if ($desc){
            if(!$this->isUtf8($desc))
                $desc = utf8_encode($desc);
            $column->setDescription($desc);
        }

        return $column;
    }
1232806
public function castRowValues(array &$row)
    {
        foreach ($row as $field_name => $value) {
            $row[$field_name] = $this->castValue($field_name, $value);
        }
    }
623095
public function getHtmlTable(array $rows): string
  {
    $this->prepare();

    $ret = $this->getHtmlPrefix();

    $ret .= Html::generateTag('table', $this->attributes);

    // Generate HTML code for the column classes.
    $ret .= '<colgroup>';
    foreach ($this->columns as $column)
    {
      // If required disable sorting of this column.
      if (!$this->sortable) $column->notSortable();

      // Generate column element.
      $ret .= $column->getHtmlCol();
    }
    $ret .= '</colgroup>';

    // Generate HTML code for the table header.
    $ret .= Html::generateTag('thead', ['class' => static::$class]);
    $ret .= $this->getHtmlHeader();
    $ret .= '</thead>';

    // Generate HTML code for the table body.
    $ret .= Html::generateTag('tbody', ['class' => static::$class]);
    $ret .= $this->getHtmlBody($rows);
    $ret .= '</tbody>';

    $ret .= '</table>';

    $ret .= $this->getHtmlPostfix();

    $this->generateResponsiveCss();

    return $ret;
  }
46573
private function _fillTemplate($template, $values) {
		foreach ($values as $key => $value) {
			$template = str_replace($key, $value, $template);
		}

		return $template;
	}
1002397
public function col_userid($row) : string {
        if (empty($row->userid)) {
            return '';
        }

        $user = (object) [];
        username_load_fields_from_object($user, $row, 'user');

        return fullname($user);
    }
152590
public function getColumnValue(Row $row)
	{
		$value = parent::getColumnValue($row);

		if (!is_numeric($value)) {
			return $value;
		}

		return number_format(
			(float) $value,
			(int) $this->number_format[0],
			(string) $this->number_format[1],
			(string) $this->number_format[2]
		);
	}
583713
protected function getAttributesString(array $row)
    {
        $attributes = [];
        foreach ($this->getAttributes() as $attrKey => $attrValue) {
            if ('href' === $attrKey) {
                $attrValue = $this->getLinkReplaced($row);
            }
            $attributes[] = $attrKey.'="'.$attrValue.'"';
        }

        return implode(' ', $attributes);
    }
455975
public function getCellValue(int $col, int $row): string
    {
        if (!isset($this->structure[$row][$col])) {
            return '';
        }

        return $this->structure[$row][$col]['value'];
    }
26006
public function getValue($row, Table $table) {
        $res = '';
        if ($this->value) {
            if (is_callable($this->value)){
                $res = call_user_func($this->value, $row, $table);
            } else {
                eval("\$res = {$this->value};");
            }
        } else {
            $res = ('select' == $this->type) ? ((isset($this->options[$row->{$this->name}]) ? $this->options[$row->{$this->name}] : $this->noValueDisplay)) : ($row->{$this->name}?:$this->noValueDisplay);
        }
        return $this->canEdit ? "<{$this->linkElement} class='inline-edit-column-edit-link' href='#'>" . $res . "</{$this->linkElement}>" . $this->getForm($row, $table) : $res;

    }
1250130
protected static function initializeColumns(\Template $template)
	{
		$layout = Bootstrap::getLayout();

		switch($layout->cols)
		{
			case '2cll':
				$template->leftClass           = $layout->bootstrap_leftClass;
				$template->mainClass           = $layout->bootstrap_mainClass;

				$template->mainClassAttribute  = sprintf(static::$classAttribute, $layout->bootstrap_mainClass);
				$template->leftClassAttribute  = sprintf(static::$classAttribute, $layout->bootstrap_leftClass);
				break;

			case '2clr':
				$template->rightClass          = $layout->bootstrap_rightClass;
				$template->mainClass           = $layout->bootstrap_mainClass;

				$template->mainClassAttribute  = sprintf(static::$classAttribute, $layout->bootstrap_mainClass);
				$template->rightClassAttribute = sprintf(static::$classAttribute, $layout->bootstrap_rightClass);
				break;

			case '3cl':
				$template->leftClass           = $layout->bootstrap_leftClass;
				$template->rightClass          = $layout->bootstrap_rightClass;
				$template->mainClass           = $layout->bootstrap_mainClass;

				$template->mainClassAttribute  = sprintf(static::$classAttribute, $layout->bootstrap_mainClass);
				$template->rightClassAttribute = sprintf(static::$classAttribute, $layout->bootstrap_rightClass);
				$template->leftClassAttribute  = sprintf(static::$classAttribute, $layout->bootstrap_leftClass);
				break;

			default:
				$template->useGrid = false;
				return;
		}

		$template->useGrid = true;
	}
1041826
public function quoteBulkValues(array $row): string
    {
        $values = [];
        foreach ($row as $key => $value) {
            $values[] = $this->quoteValue($value);
        }

        return implode(',', $values);
    }
1026906
public function castRow($row)
    {
        if ($this->isLocked) {
            // schema is locked, no more inferring is needed
            return parent::castRow($row);
        } else {
            // add the row to the inferrer, update the descriptor according to the best inferred fields
            $this->fieldsInferer->addRows([$row]);
            $this->descriptor->fields = [];
            foreach ($this->fieldsInferer->infer() as $fieldName => $inferredField) {
                /* @var Fields\BaseField $inferredField */
                $this->descriptor->fields[] = $inferredField->descriptor();
            }
            $this->castRows = $this->fieldsInferer->castRows();

            return $this->castRows[count($this->castRows) - 1];
        }
    }
1208397
protected function guessHeader(array $row)
    {
        $containsOnlyColumnNames = $this->containsOnlyColumnNames($row);
        $columnsAreUnique = $this->columnsAreUnique($row);

        if ($containsOnlyColumnNames && $columnsAreUnique) {
            return $row;
        }

        if (!$this->getOption(self::FORCE_HEADER_LINE)) {
            return range(0, count($row)-1);
        }

        if (!$containsOnlyColumnNames) {
            $hint = implode(', ', $this->collectInvalidColumns($row));
            throw new DetectionFailedException("No header found because the following columns do not like a column name: [$hint]");
        }

        // !$columnsAreUnique)
        $hint = implode(', ', $this->collectDoubledColumns($row));
        throw new DetectionFailedException("No header found because the following columns occurs more than once: [$hint]");

    }
819658
public function getValue($row, $column)
    {
        $row = $this->validateRowInRange($row);
        $column = $this->validateColumnInRange($column);

        return $this->grid[$row - 1][$column - 1];
    }
395412
public function getContent($rowResult)
    {
        if ($this->callManager($rowResult) === false) {
            return '';
        }

        return $this->builder->render($this->template);
    }