public static function createTableColumnForSchemaColumn(Column $column, $label)
    {
        if ($column instanceof TimeColumn) {
            new \Rhubarb\Leaf\Table\Leaves\Columns\TimeColumn($column->columnName, $label);
        }

        if ($column instanceof DateColumn || $column instanceof MySqlDateTimeColumn) {
            return new \Rhubarb\Leaf\Table\Leaves\Columns\DateColumn($column->columnName, $label);
        }

        if ($column instanceof BooleanColumn) {
            return new \Rhubarb\Leaf\Table\Leaves\Columns\BooleanColumn($column->columnName, $label);
        }

        $tableColumn = new ModelColumn($column->columnName, $label);

        if ($column instanceof IntegerColumn) {
            $tableColumn->addCssClass("number");
            $tableColumn->addCssClass("integer");
        }

        if ($column instanceof FloatColumn) {
            $tableColumn->addCssClass("number");
            $tableColumn->addCssClass("float");
        }

        if ($column instanceof MoneyColumn) {
            $tableColumn->addCssClass("number");
            $tableColumn->addCssClass("money");
        }

        return $tableColumn;
    }
public static function createTableColumnForSchemaColumn(Column $column, $label)
    {
        if ($column instanceof TimeColumn) {
            new \Rhubarb\Leaf\Table\Leaves\Columns\TimeColumn($column->columnName, $label);
        }

        if ($column instanceof DateColumn || $column instanceof MySqlDateTimeColumn) {
            return new \Rhubarb\Leaf\Table\Leaves\Columns\DateColumn($column->columnName, $label);
        }

        if ($column instanceof BooleanColumn) {
            return new \Rhubarb\Leaf\Table\Leaves\Columns\BooleanColumn($column->columnName, $label);
        }

        $tableColumn = new ModelColumn($column->columnName, $label);

        if ($column instanceof IntegerColumn) {
            $tableColumn->addCssClass("number");
            $tableColumn->addCssClass("integer");
        }

        if ($column instanceof FloatColumn) {
            $tableColumn->addCssClass("number");
            $tableColumn->addCssClass("float");
        }

        if ($column instanceof MoneyColumn) {
            $tableColumn->addCssClass("number");
            $tableColumn->addCssClass("money");
        }

        return $tableColumn;
    }
public static function createTableColumnForSchemaColumn ( Column $ column , $ label ) { if ( $ column instanceof TimeColumn ) { new \ Rhubarb \ Leaf \ Table \ Leaves \ Columns \ TimeColumn ( $ column -> columnName , $ label ) ; } if ( $ column instanceof DateColumn || $ column instanceof MySqlDateTimeColumn ) { return new \ Rhubarb \ Leaf \ Table \ Leaves \ Columns \ DateColumn ( $ column -> columnName , $ label ) ; } if ( $ column instanceof BooleanColumn ) { return new \ Rhubarb \ Leaf \ Table \ Leaves \ Columns \ BooleanColumn ( $ column -> columnName , $ label ) ; } $ tableColumn = new ModelColumn ( $ column -> columnName , $ label ) ; if ( $ column instanceof IntegerColumn ) { $ tableColumn -> addCssClass ( "number" ) ; $ tableColumn -> addCssClass ( "integer" ) ; } if ( $ column instanceof FloatColumn ) { $ tableColumn -> addCssClass ( "number" ) ; $ tableColumn -> addCssClass ( "float" ) ; } if ( $ column instanceof MoneyColumn ) { $ tableColumn -> addCssClass ( "number" ) ; $ tableColumn -> addCssClass ( "money" ) ; } return $ tableColumn ; }
Creates the correct type of table column for the supplied model column.

@param \Rhubarb\Stem\Schema\Columns\Column $column
@param $label
@return DateColumn|ModelColumn
Creates the correct type of table column for the supplied model column .