<?php
namespace Claromentis\Core\DataTable\Shared;

$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"] ?: array()) + array();
use Claromentis\Core\DataTable;






trait ColumnHelper
{
    
    
    
    
    
    protected function CreateWithColumns($columns)
    {
        $output = array();
        foreach ($columns as $column) {
            $dt_column = new DataTable\Column($column[0], $column[1]);
            if (isset($column[2])) {
                $dt_column->SetDecorator($column[2]);
            } else {
                $dt_column->SetDecorator(new DataTable\Decorator\Text());
            }
            if (isset($column[3])) {
                $dt_column->SetOrderable((bool) $column[3]);
            }
            $output[$column[0]] = $dt_column;
        }
        return $output;
    }
}