Grid_Basic::setFormatter PHP Method

setFormatter() public method

Replace current formatter for field.
public setFormatter ( string $field, mixed $formatter, $options = null )
$field string
$formatter mixed
    public function setFormatter($field, $formatter, $options = null)
    {
        if (!isset($this->columns[$field])) {
            throw new BaseException('Cannot format nonexistant field ' . $field);
        }
        $this->columns[$field]['type'] = '';
        $this->addFormatter($field, $formatter, $options);
        $this->last_column = $field;
        return $this;
    }