当前位置: 首页>>代码示例>>PHP>>正文


PHP AdminInterface::getList方法代码示例

本文整理汇总了PHP中Sonata\AdminBundle\Admin\AdminInterface::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminInterface::getList方法的具体用法?PHP AdminInterface::getList怎么用?PHP AdminInterface::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sonata\AdminBundle\Admin\AdminInterface的用法示例。


在下文中一共展示了AdminInterface::getList方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getBaseDatagrid

 /**
  * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
  * @param array $values
  * @return \Sonata\AdminBundle\Datagrid\DatagridInterface
  */
 public function getBaseDatagrid(AdminInterface $admin, array $values = array())
 {
     $pager = new Pager();
     $pager->setCountColumn($admin->getModelManager()->getIdentifierFieldNames($admin->getClass()));
     $formBuilder = $this->formFactory->createNamedBuilder('form', 'filter', array(), array('csrf_protection' => false));
     return new Datagrid($admin->createQuery(), $admin->getList(), $pager, $formBuilder, $values);
 }
开发者ID:hunter1271,项目名称:IphpTreeBundle,代码行数:12,代码来源:DatagridBuilder.php

示例2: getBaseDatagrid

 /**
  * {@inheritdoc}
  */
 public function getBaseDatagrid(AdminInterface $admin, array $values = array())
 {
     $pager = $this->getPager($admin->getPagerType());
     $pager->setCountColumn($admin->getModelManager()->getIdentifierFieldNames($admin->getClass()));
     $defaultOptions = array();
     if ($this->csrfTokenEnabled) {
         $defaultOptions['csrf_protection'] = false;
     }
     $formBuilder = $this->formFactory->createNamedBuilder('filter', 'form', array(), $defaultOptions);
     return new Datagrid($admin->createQuery(), $admin->getList(), $pager, $formBuilder, $values);
 }
开发者ID:jayesbe,项目名称:SonataDoctrineORMAdminBundle,代码行数:14,代码来源:DatagridBuilder.php

示例3: getBaseDatagrid

 /**
  * {@inheritdoc}
  */
 public function getBaseDatagrid(AdminInterface $admin, array $values = array())
 {
     $defaultOptions = array();
     if ($this->csrfTokenEnabled) {
         $defaultOptions['csrf_protection'] = false;
     }
     $formBuilder = $this->formFactory->createNamedBuilder('filter', 'form', array(), $defaultOptions);
     return new Datagrid($admin->createQuery(), $admin->getList(), $this->getPager(), $formBuilder, $values);
 }
开发者ID:jmontoyaa,项目名称:SonataDoctrinePhpcrAdminBundle,代码行数:12,代码来源:DatagridBuilder.php

示例4: getBaseDatagrid

    /**
     * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
     * @param array $values
     * @return \Sonata\AdminBundle\Datagrid\DatagridInterface
     */
    public function getBaseDatagrid(AdminInterface $admin, array $values = array())
    {
        $queryBuilder = $admin->getModelManager()->createQuery($admin->getClass());

        $query = new ProxyQuery($queryBuilder);
        $pager = new Pager;
        $pager->setCountColumn($admin->getModelManager()->getIdentifierFieldNames($admin->getClass()));

        return new Datagrid(
            $query,
            $admin->getList(),
            $pager,
            $this->formFactory,
            $values
        );
    }
开发者ID:nibsirahsieu,项目名称:AdminBundle,代码行数:21,代码来源:DatagridBuilder.php

示例5: getBaseDatagrid

 /**
  * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
  * @param array $values
  * @return \Sonata\AdminBundle\Datagrid\DatagridInterface
  */
 public function getBaseDatagrid(AdminInterface $admin, array $values = array())
 {
     $queryBuilder = $admin->getModelManager()->getDocumentManager()->createQueryBuilder();
     $qomFactory = $queryBuilder->getQOMFactory();
     $query = new ProxyQuery($qomFactory, $queryBuilder);
     $query->setDocumentName($admin->getClass());
     $query->setDocumentManager($admin->getModelManager()->getDocumentManager());
     $pager = new Pager();
     $formBuilder = $this->formFactory->createNamedBuilder('form', 'filter', array(), array('csrf_protection' => false));
     return new Datagrid($query, $admin->getList(), $pager, $formBuilder, $values);
 }
开发者ID:nzzdev,项目名称:SonataDoctrinePhpcrAdminBundle,代码行数:16,代码来源:DatagridBuilder.php

示例6: getBaseDatagrid

 /**
  * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
  * @param array $values
  * @return \Sonata\AdminBundle\Datagrid\DatagridInterface
  */
 public function getBaseDatagrid(AdminInterface $admin, array $values = array())
 {
     $queryBuilder = $admin->getModelManager()->createQuery($admin->getClass());
     $query = new ProxyQuery($queryBuilder);
     return new Datagrid($query, $admin->getList(), new Pager(), $this->formFactory, $values);
 }
开发者ID:renegare,项目名称:AdminBundle,代码行数:11,代码来源:DatagridBuilder.php


注:本文中的Sonata\AdminBundle\Admin\AdminInterface::getList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。