Add a column to append grid

@param string $name
@param string $display
@param string $type
@param string $value
@param array $opts
776246
public function addColumn($name, $display = null, $type = 'text',
                              $value = null, $opts = array())
    {
        // Replace currency
        if ($type == self::TYPE_CURRENCY) {
            $type = self::TYPE_CUSTOM;

            $opts['customBuilder'] = 'appendGridCurrencyBuilder';
            $opts['customGetter']  = 'appendGridCurrencyGetter';
            $opts['customSetter']  = 'appendGridCurrencySetter';

            if ($value === null) {
                $value = '0.00';
            }

            $this->requireAccounting = true;
        }

        parent::addColumn($name, $display, $type, $value, $opts);
    }
1372004
public function addSql($name, $type = self::SQL_START, $value = '') {
        if ($this->_enabled == true) {
            switch ($type) {
                case self::SQL_START:
                    if (isset($this->_sql[$name])) {
                        $this->_lastSql = $name;
                    }
                    else {
                        $this->_lastSql = $name . rand(0, 10);
                    }

                    $this->_sql[$this->_lastSql] = [];
                    $this->_sql[$this->_lastSql]['time'] = microtime(true);
                    break;

                case self::SQL_END:
                    $this->_sql[$this->_lastSql]['time'] = round((microtime(true) - $this->_sql[$this->_lastSql]['time']) * 1000, 4);
                    $this->_sql[$this->_lastSql]['query'] = $value;
                    break;
            }
        }
    }
271149
public function addType(string $name, string $type): void{
        $this->types[$name] = new Type($type);
    }
381707
public function addFunction($type, $name, callable $function)
    {

        $this->appendToArrayOrCallForEachAlias($type, function() use ($type, $name, $function){
            $this->customFunctions[$type][$name] = $function;
        }, function($target) use ( $function, $name){
            $this->addFunction($target, $name, $function);
        });

    }
265975
protected function fieldAddRaw($name, $type, $params = array()) {
		if (empty($name)) {
			return false;
		}
		$fldobj = (object)$params;
		$fldobj->name = $name;
		$fldobj->type = $type;
		$this->fields[$name] = $fldobj;
	}
1191919
public RestQueryResult addColumn( String name,
                                      String type ) {
        if (!StringUtil.isBlank(name)) {
            columns.put(name, type);
        }
        return this;
    }
137624
public function buildBody($label, $name, $value, $type)
    {
        switch ($type) {
            case 'text':
                $this->Modal->modalBody .= view('Ajaxis::bootstrap.types.text',
                    compact('label', 'name', 'value', 'type'))->render();
                break;

            case 'date':
                $this->Modal->modalBody .=
                view('Ajaxis::bootstrap.types.text', compact('name', 'value', 'label', 'type'))->render();
                break;

            case 'select':
                $this->Modal->modalBody .=
                view('Ajaxis::bootstrap.types.select', compact('value', 'label', 'name'))->render();
                break;

            case 'radio':
                $this->Modal->modalBody .=
                view('Ajaxis::bootstrap.types.radio', compact('name', 'value', 'label'))->render();
                break;

            case 'checkbox':
                $this->Modal->modalBody .=
                view('Ajaxis::bootstrap.types.checkbox', compact('name', 'value', 'label'))->render();
                break;

            case 'hidden':
                $this->Modal->modalBody .=
                view('Ajaxis::bootstrap.types.text', compact('label', 'name', 'value', 'type'))->render();
                break;

            case 'password':
                $this->Modal->modalBody .=
                view('Ajaxis::bootstrap.types.text', compact('label', 'name', 'value', 'type'))->render();
                break;
            case 'file':
                $this->Modal->modalBody .=
                view('Ajaxis::bootstrap.types.text', compact('label', 'name', 'value', 'type'))->render();
                break;
            default:
                throw new \Exception('Type not found'.$type);
        }
    }
1206787
public function addLink($name, $label = '', $link = '#', $binds = [], $attr = [] )
    {
        $c = new Column\Link($name, $label, $link, $binds, $attr);
        $this->addColumn($c);

        return $c;
    }
293474
public function modifyColumn(
        $name,
        $type = 'text',
        $signed = true,
        $allowNull = true,
        $default = '',
        $comment = '',
        $options = []
    ) {
        if ($name instanceof Column) {
            $column = $name;
            $length = $column->getLength();
            $name = $column->getName();
            $type = $column->getType();
            $signed = $column->getSigned();
            $allowNull = $column->getAllowNull();
            $default = $column->getDefault();
            $position = $column->getPosition();
            $comment = $column->getComment();
            $suffix = $column->getSuffix();
        } else {
            $position = isset($options['position']) ? $options['position'] : null;
            $suffix = isset($options['suffix']) ? $options['suffix'] : null;
        }

        if (!$this->hasColumn($name)) {
            return $this;
        }

        $type = MysqlType::getType($type);
        $length = isset($length) ? $length : MysqlType::getLength($type);
        $length = $length ? '(' . $length . ')' : null;

        $query = MysqlGrammar::modifyColumn(
            $this->getName(),
            $name,
            $type . $length,
            $signed,
            $allowNull,
            $default,
            $position,
            $comment
        );

        // Add suffix
        $query = MysqlGrammar::build($query, $suffix);

        $this->db->setQuery($query)->execute();

        return $this->reset();
    }
497947
protected function addOption(string $name, string $value): void
    {
        $this->options[$name] = $value;
    }
230036
public function addOption($value, $display = null)
    {
        if (null === $display)
            $display = $value;

        $this->_options[] = array($value, $display);

        return $this;
    }
1366539
public function add(
        $name,
        $type = null,
        array $filterOptions = [],
        $fieldType = null,
        $fieldOptions = null,
        array $fieldDescriptionOptions = []
    ) {
        if (\is_array($fieldOptions)) {
            $filterOptions['field_options'] = $fieldOptions;
        }

        if ($fieldType) {
            $filterOptions['field_type'] = $fieldType;
        }

        if ($name instanceof FieldDescriptionInterface) {
            $fieldDescription = $name;
            $fieldDescription->mergeOptions($filterOptions);
        } elseif (\is_string($name)) {
            if ($this->admin->hasFilterFieldDescription($name)) {
                throw new \RuntimeException(sprintf('Duplicate field name "%s" in datagrid mapper. Names should be unique.', $name));
            }

            if (!isset($filterOptions['field_name'])) {
                $filterOptions['field_name'] = substr(strrchr('.'.$name, '.'), 1);
            }

            $fieldDescription = $this->admin->getModelManager()->getNewFieldDescriptionInstance(
                $this->admin->getClass(),
                $name,
                array_merge($filterOptions, $fieldDescriptionOptions)
            );
        } else {
            throw new \RuntimeException(
                'Unknown field name in datagrid mapper.'
                .' Field name should be either of FieldDescriptionInterface interface or string.'
            );
        }

        // add the field with the DatagridBuilder
        $this->builder->addFilter($this->datagrid, $type, $fieldDescription, $this->admin);

        return $this;
    }
390115
public static function addIndex($table, $type, $columns, $name)
    {
        $cols = static::buildIndexDeclare($name, $columns, $table);

        return static::build(
            'CREATE',
            strtoupper($type),
            $cols
        );
    }
1006747
protected function addColumn($propertyType, $name, array $parameters = array()) {


        $attributes = array($name => compact('propertyType'));

        $this->columns[$name] = compact('propertyType');

        return $attributes;

        $attributes = array_merge(compact('propertyType', 'name'), $parameters);

        $this->columns[] = $column = new Fluent($attributes);

        return $column;
    }
162448
public function addFunctionPreCallFunction($type, $name, callable $function)
    {
        $this->appendToArrayOrCallForEachAlias($type, function() use ($type, $name, $function){
            $this->fnPreCallFunctions[$type][$name][] = $function;
        }, function($target) use ( $function, $name){
            $this->addFunctionPreCallFunction($target, $name, $function);
        });


    }
555829
public function addColumn($name, $type, $size = false) {
        return $this->table ? $this->table->column($name, $type, $size) : false;
    }
710384
public function addType($name, $type, $data = null, $options = array())
    {
        $this->types[$name] = $type;
        $this->data[$name] = $data;
        $this->options[$name] = $options;

        return $this;
    }