Esempio n. 1
0
 public function testShouldBeAbleProduceArrayOfActionButtons()
 {
     $actionData = array(array('label', 'url'), array('label2', 'url2'));
     $row = new Row($this->data, array());
     $actionButtonsArray = $this->parser->actionsToActionButtons($actionData, $row);
     $this->assertEquals(count($actionButtonsArray), count($actionData));
     $this->assertInstanceOf("Datagrid\\BasicElements\\ActionButton", $actionButtonsArray[0]);
 }
Esempio n. 2
0
 public function __construct(array $actions, Row $row)
 {
     $parser = new Parser();
     $this->actionButtons = $parser->actionsToActionButtons($actions, $row);
     $this->html = new Html();
 }