Exemplo n.º 1
0
 public function testExceptionOnRenderingUnboundComponent()
 {
     $renderer = $this->getMock('Jfsimon\\Datagrid\\Service\\RendererInterface');
     $component = new Row('type');
     $this->setExpectedException('Jfsimon\\Datagrid\\Exception\\WorkflowException');
     $component->render($renderer);
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function getRendererTemplates()
 {
     $name = $this->children['content'] ? $this->children['content']->getName() . 'Cell' : 'cell';
     return array($this->row->getSection()->getGrid()->getName() . ucfirst($this->row->getSection()->getName()) . ucfirst($this->row->getName()) . ucfirst($name), $this->row->getSection()->getName() . ucfirst($this->row->getName()) . ucfirst($name), $this->row->getName() . ucfirst($name), $name);
 }
Exemplo n.º 3
0
 /**
  * @param Row         $row
  * @param Entity|null $entity
  *
  * @return Column
  *
  * @throws WorkflowException
  */
 public function build(Row $row, Entity $entity = null)
 {
     if (null === $this->options) {
         throw WorkflowException::notConfiguredColumn($this, 'row building');
     }
     $cell = isset($this->handlers[$row->getType()]) ? $this->handlers[$row->getType()]->handle($this, $entity, $this->options) : new Cell();
     $row->add($this->name, $cell);
     return $this;
 }