示例#1
0
 public function testDataSourceWithOptions()
 {
     $options = $sortedOptions = ['foo' => 'bar', 'baz' => 'bat'];
     ksort($sortedOptions);
     $this->dataSourceBuilder->expects($this->once())->method('createDataSource')->with($this->identicalTo($sortedOptions))->will($this->returnValue($dataSource = $this->createDataSourceMock()));
     $this->assertSame($dataSource, $this->view->getDataSource($options));
     $this->assertSame($dataSource, $this->view->getDataSource($sortedOptions));
 }
示例#2
0
文件: GridView.php 项目: php-lug/lug
 /**
  * @param GridInterface              $definition
  * @param DataSourceBuilderInterface $dataSourceBuilder
  * @param FormView                   $form
  * @param FormView                   $batchForm
  */
 public function __construct(GridInterface $definition, DataSourceBuilderInterface $dataSourceBuilder, FormView $form = null, FormView $batchForm = null)
 {
     parent::__construct($definition, $dataSourceBuilder);
     $this->setForm($form);
     $this->setBatchForm($batchForm);
 }