Пример #1
0
 public function testSetDataForArray()
 {
     $gridData = array(array('one'), array('two'), array('three'), array('four'), array('bazinga!'), array('five'));
     $this->datagrid->setData($gridData);
     $view = $this->datagrid->createView();
     $keys = array();
     foreach ($view as $row) {
         $keys[] = $row->getIndex();
     }
     $this->assertEquals(array_keys($gridData), $keys);
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function getData()
 {
     return array('datagrid_view' => $this->dataGrid->createView(), 'datasource_view' => $this->dataSource->createView(), 'element' => $this->element);
 }