protected function useDefinedColumn()
    {
        // clear all display callbacks.
        $this->displayCallbacks = [];

        $class = static::$defined[$this->name];

        if ($class instanceof Closure) {
            $this->display($class);

            return;
        }

        if (!class_exists($class) || !is_subclass_of($class, AbstractDisplayer::class)) {
            throw new \Exception("Invalid column definition [$class]");
        }

        $grid = $this->grid;
        $column = $this;

        $this->display(function ($value) use ($grid, $column, $class) {
            $definition = new $class($value, $grid, $column, $this);

            return $definition->display();
        });
    }
protected function useDefinedColumn()
    {
        // clear all display callbacks.
        $this->displayCallbacks = [];

        $class = static::$defined[$this->name];

        if ($class instanceof Closure) {
            $this->display($class);

            return;
        }

        if (!class_exists($class) || !is_subclass_of($class, AbstractDisplayer::class)) {
            throw new \Exception("Invalid column definition [$class]");
        }

        $grid = $this->grid;
        $column = $this;

        $this->display(function ($value) use ($grid, $column, $class) {
            $definition = new $class($value, $grid, $column, $this);

            return $definition->display();
        });
    }
protected function useDefinedColumn ( ) { // clear all display callbacks. $ this -> displayCallbacks = [ ] ; $ class = static :: $ defined [ $ this -> name ] ; if ( $ class instanceof Closure ) { $ this -> display ( $ class ) ; return ; } if ( ! class_exists ( $ class ) || ! is_subclass_of ( $ class , AbstractDisplayer :: class ) ) { throw new \ Exception ( "Invalid column definition [$class]" ) ; } $ grid = $ this -> grid ; $ column = $ this ; $ this -> display ( function ( $ value ) use ( $ grid , $ column , $ class ) { $ definition = new $ class ( $ value , $ grid , $ column , $ this ) ; return $ definition -> display ( ) ; } ) ; }
Use a defined column.

@throws \Exception
Use a defined column .