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

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"] = (@$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"] ?: 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;
    }
}