コード例 #1
0
 /**
  * Ctor.
  *
  * @param Serializer             $serializer
  * @param array                  $requestParams
  * @param DatatableViewInterface $datatableView
  * @param array                  $configs
  * @param Twig_Environment       $twig
  * @param boolean                $imagineBundle
  * @param boolean                $doctrineExtensions
  * @param string                 $locale
  *
  * @throws Exception
  */
 public function __construct(Serializer $serializer, array $requestParams, DatatableViewInterface $datatableView, array $configs, Twig_Environment $twig, $imagineBundle, $doctrineExtensions, $locale)
 {
     $this->serializer = $serializer;
     $this->requestParams = $requestParams;
     $this->datatableView = $datatableView;
     $this->individualFiltering = $this->datatableView->getOptions()->getIndividualFiltering();
     $this->entity = $this->datatableView->getEntity();
     $this->em = $this->datatableView->getEntityManager();
     $this->metadata = $this->getMetadata($this->entity);
     $this->tableName = $this->getTableName($this->metadata);
     $this->rootEntityIdentifier = $this->getIdentifier($this->metadata);
     $this->qb = $this->em->createQueryBuilder();
     $this->selectColumns = array();
     $this->virtualColumns = $datatableView->getColumnBuilder()->getVirtualColumns();
     $this->joins = array();
     $this->searchColumns = array();
     $this->orderColumns = array();
     $this->callbacks = array();
     $this->columns = $datatableView->getColumnBuilder()->getColumns();
     $this->configs = $configs;
     $this->twig = $twig;
     $this->imagineBundle = $imagineBundle;
     $this->doctrineExtensions = $doctrineExtensions;
     $this->locale = $locale;
     $this->setLineFormatter();
     $this->setupColumnArrays();
 }
コード例 #2
0
 /**
  * Ctor.
  *
  * @param Serializer             $serializer
  * @param array                  $requestParams
  * @param DatatableViewInterface $datatableView
  */
 public function __construct(Serializer $serializer, array $requestParams, DatatableViewInterface $datatableView)
 {
     $this->serializer = $serializer;
     $this->requestParams = $requestParams;
     $this->datatableView = $datatableView;
     $this->individualFiltering = $this->datatableView->getOptions()->getIndividualFiltering();
     $this->entity = $this->datatableView->getEntity();
     $this->em = $this->datatableView->getEntityManager();
     $metadata = $this->getMetadata($this->entity);
     $this->tableName = $this->getTableName($metadata);
     $this->rootEntityIdentifier = $this->getIdentifier($metadata);
     $this->qb = $this->em->createQueryBuilder();
     $this->selectColumns = array();
     $this->virtualColumns = $datatableView->getColumnBuilder()->getVirtualColumns();
     $this->joins = array();
     $this->searchColumns = array();
     $this->orderColumns = array();
     $this->callbacks = array();
     $this->columns = $datatableView->getColumnBuilder()->getColumns();
     $this->setLineFormatter();
     $this->setupColumnArrays();
 }