/** * Handle the command. * * @param GetColumnValue $command * @return mixed */ public function handle(GetColumnValue $command) { $entry = $command->getEntry(); $table = $command->getTable(); $column = $command->getColumn(); return $this->value->make($table, $column, $entry); }
/** * Build the columns. * * @param TableBuilder $builder * @param $entry * @return ColumnCollection */ public function build(TableBuilder $builder, $entry) { $table = $builder->getTable(); $columns = new ColumnCollection(); $this->input->read($builder); foreach ($builder->getColumns() as $column) { array_set($column, 'entry', $entry); $column = $this->evaluator->evaluate($column, compact('entry', 'table')); $column['value'] = $this->value->make($table, $column, $entry); $columns->push($this->factory->make($column)); } return $columns; }