Add Code column to $columns container

@param $name
@param string $label
@param array $attr
@return \FrenchFrogs\Table\Column\Code
18344
public function addCode($name, $label = '', $attr = [])
    {
        $c = new Column\Code($name, $label, $attr);
        $this->addColumn($c);
        return $c;
    }
622399
public function addElement($cell, $name = null, $attrs = null) {
		if (! $cell instanceof TableCell) {
			if ($this->_headRow) {
				$cell = new TableHeadCell($cell, $attrs);
			} else {
				$cell = new TableCell($cell, $attrs);
			}
		}
		
		return parent::addElement($cell, $name);
	}
1206787
public function addLink($name, $label = '', $link = '#', $binds = [], $attr = [] )
    {
        $c = new Column\Link($name, $label, $link, $binds, $attr);
        $this->addColumn($c);

        return $c;
    }
809596
public function textField($key, $label=null, array $attr=[]){
		$field = $this->factory("text", $key, $label, $attr);
		return $this->addField($field);
	}
124745
public function addBoolean($name, $label = '', $attr = [] )
    {
        $e = new \FrenchFrogs\Form\Element\Boolean($name, $label, $attr);
        $this->addElement($e);
        return $e;
    }
484144
public function add($columns, $label = null)
    {

        if (!is_array($columns)) {
            $columns = [$columns => $label];
        }

        foreach ($columns as $column => $label) {
            if (is_null($label)) {
                $label = str_replace(['_', '-'], ' ', ucfirst($column));
            }

            $this->add[$column] = $label;
        }

        return $this;
    }
644562
protected function add_column_header($key, $label, $sortable = true, $columnclass = '') {
        if (empty($this->columns)) {
            $this->define_columns([$key]);
            $this->define_headers([$label]);
        } else {
            $this->columns[$key] = count($this->columns);
            $this->column_style[$key] = array();
            $this->column_class[$key] = $columnclass;
            $this->column_suppress[$key] = false;
            $this->headers[] = $label;
        }
        if ($columnclass !== null) {
            $this->column_class($key, $columnclass);
        }
        if (!$sortable) {
            $this->no_sorting($key);
        }
    }
1201665
public function addColumn($name, $label = null)
	{
		if (!$this->rowPrimaryKey) {
			$this->rowPrimaryKey = $name;
		}

		$label = $label ? $this->translate($label) : ucfirst($name);
		return $this->columns[$name] = new Column($name, $label, $this);
	}
978590
public function addTitle($name, $attribs = [])
    {
        $attribs[static::COL_KEY]['colspan'] = 2;

        $this->addItem($name, false, $attribs);

        return $this;
    }
1176568
public function addHidden($name, $attr = [])
    {
        $e = new \FrenchFrogs\Form\Element\Hidden($name, $attr);
        $this->addElement($e);
        return $e;
    }
113565
public function addLabelColumn($labelColumn)
    {
        if (is_array($labelColumn)) {
            foreach ($labelColumn as $label) {
                $this->addLabelColumn($label);
            }
            return;
        }
        $this->labelColumns[$labelColumn] = true;
    }
178013
public function addLabelDate($name, $label = '')
    {
        $e = new \FrenchFrogs\Form\Element\LabelDate($name, $label);
        $this->addElement($e);

        return $e;
    }
371500
public function addRemoteBoolean($name, $label = '', $function = null)
    {
        $c = new Column\RemoteBoolean($name, $label, $function);
        $this->addColumn($c);

        return $c;
    }
365802
public function addColumn($formatters, $name = null, $descr = null)
    {
        if ($name === null) {
            $name = $formatters;
            $formatters = 'text';
        }
        if ($formatters === null) {
            $formatters = 'text';
        }

        if ($descr === null) {
            $descr = ucwords(str_replace('_', ' ', $name));
        }
        if (is_array($descr)) {
            $descr['descr'] = $this->app->_($descr['descr']);
        } else {
            $descr = $this->app->_($descr);
        }

        $this->columns[$name] = array('type' => $formatters);

        if (is_array($descr)) {
            $this->columns[$name] = array_merge($this->columns[$name], $descr);
        } else {
            $this->columns[$name]['descr'] = $descr;
        }

        if ($this->columns[$name]['icon']) {
            if ($this->columns[$name]['icon'][0] != '<') {
                $this->columns[$name]['icon'] = '<i class="icon-'.
                    $this->columns[$name]['icon'].'"></i>&nbsp;';
            } else {
                throw $this->exception('obsolete way of using icon. Do not specify HTML code, but juts the icon');
            }
        }

        $this->last_column = $name;

        if (!is_string($formatters) && is_callable($formatters)) {
            $this->columns[$name]['fx'] = $formatters;

            return $this;
        }

        // TODO call addFormatter instead!
        $subtypes = explode(',', $formatters);
        foreach ($subtypes as $subtype) {
            if (strpos($subtype, '\\') || strpos($subtype, '/')) {

                // add-on functionality:
                // http://agiletoolkit.org/codepad/gui/grid#codepad_gui_grid_view_example_7_ex
                if (!$this->elements[$subtype.'_'.$name]) {
                    $addon = $this->app->normalizeClassName($subtype, 'Controller_Grid_Format');
                    $this->elements[$subtype.'_'.$name] = $this->add($addon);
                }

                $addon = $this->getElement($subtype.'_'.$name);
                if (!$addon instanceof Controller_Grid_Format) {
                    throw $this->exception('Grid formatter class should extend Controller_Grid_Format class')
                        ->addMoreInfo('formater', $subtype);
                }
                $addon->initField($name, $descr);

                return $addon;
            } elseif (!$this->hasMethod($m = 'init_'.$subtype)) {
                if (!$this->hasMethod($m = 'format_'.$subtype)) {
                    // exception if formatter doesn't exist
                    throw $this->exception('No such formatter')
                        ->addMoreInfo('formater', $subtype);
                }
            } else {
                // execute formatter init_*
                $this->$m($name, $descr);
            }
        }

        return $this;
    }
373915
protected function addField($name, $label = '')
    {
        $field = new Field($name, $label);

        $field->setParent($this);

        $this->overwriteExistingField($name);

        return tap($field, function ($field) {
            $this->fields->push($field);
        });
    }
1036856
public function withMetadata(string $name, string $label)
    {
        $this->contentGroup->metadata[$name] = ['name' => $name, 'label' => $label, 'order' => $this->order++];

        return $this;
    }
805420
public function customField($key, $type, $label=null, array $attr=[]) {
		$field = $this->factory($type, $key, $label, $attr);
		return $this->addField($field);
	}