示例#1
0
 public function testExceptionWhenRegisteringHandlerOnConfiguredColumn()
 {
     $column = new Column();
     $column->configure(array());
     $this->setExpectedException('Jfsimon\\Datagrid\\Exception\\WorkflowException');
     $column->register(new LabelHandler());
 }
示例#2
0
 /**
  * {@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]));
 }
示例#3
0
 /**
  * {@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);
     }
 }
示例#4
0
 /**
  * {@inheritdoc}
  */
 public function buildColumn(Column $column, $type, array $options = array())
 {
     if ($options[self::NAME]) {
         $column->register($this->handler);
     }
 }