kartik\builder\TabularForm::isColumnSet PHP Method

isColumnSet() protected method

Checks if a grid column is set correctly.
protected isColumnSet ( string $type ) : boolean
$type string the grid column type (one of 'serial', 'action', 'checkbox').
return boolean whether the column is set.
    protected function isColumnSet($type)
    {
        $target = "\\kartik\\grid\\" . ucfirst($type) . "Column";
        $param = $type . 'Column';
        $col = $this->{$param};
        if (empty($col)) {
            $col = [];
        }
        $class = ArrayHelper::getValue($col, 'class', '');
        $out = !empty($class) && is_subclass_of($class, $target);
        if (!$out) {
            $col['class'] = $target;
            $this->{$param} = $col;
        }
        return $out;
    }