Ejemplo n.º 1
0
 protected function initDataSource(DataSourceFactoryInterface $factory)
 {
     /* @var $datasource \FSi\Component\DataSource\DataSource */
     $datasource = $factory->createDataSource('doctrine', array('entity' => $this->getClassName()), 'news');
     $datasource->addField('title', 'text', 'eq', array('form_filter' => false));
     return $datasource;
 }
Ejemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 protected function initDataSource(DataSourceFactoryInterface $factory)
 {
     $qb = $this->getRepository()->createTranslatableQueryBuilder('e', 't', 'dt');
     $datasource = $factory->createDataSource('doctrine', array('qb' => $qb), $this->getId());
     $datasource->addField('name', 'text', 'like', array('field' => 't.name'));
     return $datasource;
 }
Ejemplo n.º 3
0
 protected function initDataSource(DataSourceFactoryInterface $factory)
 {
     /* @var $datasource \FSi\Component\DataSource\DataSource */
     $datasource = $factory->createDataSource('doctrine', array('entity' => $this->getClassName()), 'subscriber');
     $datasource->addField('email', 'text', 'like', array('sortable' => true, 'form_options' => array('label' => 'admin.subscriber.list.email')));
     $datasource->addField('created_at', 'date', 'between', array('field' => 'createdAt', 'sortable' => true, 'form_from_options' => array('widget' => 'single_text', 'label' => 'admin.subscriber.list.created_at_from'), 'form_to_options' => array('widget' => 'single_text', 'label' => 'admin.subscriber.list.created_at_to')));
     $datasource->addField('active', 'boolean', 'eq', array('sortable' => false, 'form_options' => array('label' => 'admin.subscriber.list.active')));
     $datasource->setMaxResults(10);
     return $datasource;
 }
Ejemplo n.º 4
0
 public function getSource(DataSourceFactoryInterface $factory)
 {
     return $factory->createDataSource('doctrine', $this->getSourceParameters(), $this->getId())->setMaxResults(10);
 }
Ejemplo n.º 5
0
 /**
  * {@inheritDoc}
  */
 protected function initDataSource(DataSourceFactoryInterface $factory)
 {
     return $factory->createDataSource('doctrine', array('entity' => $this->getClassName()), $this->getId());
 }
Ejemplo n.º 6
0
 protected function initDataSource(DataSourceFactoryInterface $factory)
 {
     $datasource = $factory->createDataSource('doctrine', array('entity' => 'FSiDemoBundle:MyEntity'), 'my_datasource');
     return $datasource;
 }
Ejemplo n.º 7
0
 protected function initDataSource(DataSourceFactoryInterface $factory)
 {
     /* @var $datasource \FSi\Component\DataSource\DataSource */
     $datasource = $factory->createDataSource('doctrine', array('entity' => $this->getClassName()), 'subscriber');
     return $datasource;
 }
 protected function initDataSource(DataSourceFactoryInterface $factory)
 {
     $qb = $this->getRepository()->createTranslatableQueryBuilder('e', 't', 'dt');
     return $factory->createDataSource('doctrine', array('qb' => $qb), $this->getId());
 }