public function testExceptionWhenRegisteringHandlerOnConfiguredColumn() { $column = new Column(); $column->configure(array()); $this->setExpectedException('Jfsimon\\Datagrid\\Exception\\WorkflowException'); $column->register(new LabelHandler()); }
/** * {@inheritdoc} */ public function buildColumn(Column $column, $type, array $options = array()) { if ($column->hasHandler(self::NAME)) { return; } if (!isset($this->formatters[$type])) { throw FormatterException::notFound($type, array_keys($this->formatters)); } $column->register(new DataHandler($this->formatters[$type])); }
/** * {@inheritdoc} */ public function buildColumn(Column $column, $type, array $options = array()) { if ($options[self::NAME]->isEnabled() && self::NAME === $type) { $column->register($this->dataHandler, true)->register($this->labelHandler, true); } }
/** * {@inheritdoc} */ public function buildColumn(Column $column, $type, array $options = array()) { if ($options[self::NAME]) { $column->register($this->handler); } }