original_string: 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();
          });
      }
code: 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();
          });
      }
code_tokens: 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 ( ) ; } ) ; }
docstring: Use a defined column.
  
  @throws \Exception
docstring_tokens: Use a defined column .