private function extractColumnConfig(ColumnInterface $column) { $data = array('id' => $column->getOption('name'), 'name' => $column->getOption('name'), 'type' => $column->getType()->getName(), 'type_class' => get_class($column->getType()), 'passed_options' => array(), 'resolved_options' => array()); foreach ($column->getOptions() as $option => $value) { if (substr($option, 0, 1) !== '_') { $data['resolved_options'][$option] = $this->valueExporter->exportValue($value); } } foreach ($column->getOption('_passed_options') as $option => $value) { $data['passed_options'][$option] = $this->valueExporter->exportValue($value); } return $data; }
public function buildBodyCellView(array &$view, ColumnInterface $column, array $data) { if (!$column->getType()->isExportable()) { $view = null; return; } return parent::buildBodyCellView($view, $column, $data); }
/** * {@inheritdoc} */ public function buildView(array &$view, ColumnInterface $column, array $data, array $options) { $type = $column->getType()->getName(); if (!isset($options['attrs']['class'])) { $options['attrs']['class'] = ''; } $options['attrs']['class'] = trim('column-' . $type . ' column-' . $options['name'] . ' ' . $options['attrs']['class']); $view = array('type' => $type, 'name' => $options['name'], 'attrs' => $options['attrs'], 'value' => static::normalize(static::format($options['format'], $data), $options)); }