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


PHP ModelAdmin::getList方法代码示例

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


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

示例1: getList

 public function getList()
 {
     if (Permission::check('ADMIN')) {
         return parent::getList();
     }
     return parent::getList()->filter(array('Approved' => false));
 }
开发者ID:jallen0927,项目名称:lytech,代码行数:7,代码来源:UnapprovedMemberAdmin.php

示例2: getList

 public function getList()
 {
     $list = parent::getList();
     if ($this->modelClass == 'PostmarkMessage') {
         $list = $list->filter('InReplyToID', 0)->sort('LastEdited DESC');
     }
     return $list;
 }
开发者ID:bueckl,项目名称:postmarkedapp,代码行数:8,代码来源:PostmarkAdmin.php

示例3: getList

 public function getList()
 {
     $list = parent::getList();
     if ($this->modelClass == 'Presentation' || $this->modelClass == 'PresentationSpeaker') {
         $list = $list->sort('Created', 'DESC');
     }
     return $list;
 }
开发者ID:balajijegan,项目名称:openstack-org,代码行数:8,代码来源:PresentationAdmin.php

示例4: getList

 public function getList()
 {
     $list = parent::getList();
     if ($this->modelClass === 'SurveyTemplate') {
         $list = $list->filter(array('ClassName' => 'SurveyTemplate'));
     }
     return $list;
 }
开发者ID:rbowen,项目名称:openstack-org,代码行数:8,代码来源:SurveyTemplateAdmin.php

示例5: getList

 public function getList()
 {
     $list = parent::getList();
     if ($this->IsEditingNews()) {
         $list = $list->sort('DateTime DESC')->filter('ClassName', $this->getSearchableClasses());
     }
     $this->extend('updateNewsList', $list);
     return $list;
 }
开发者ID:silverstripers,项目名称:silverstripe-news,代码行数:9,代码来源:NewsAdmin.php

示例6: getList

 public function getList()
 {
     $list = parent::getList();
     // Filter categories
     if ($this->modelClass == 'Category') {
         $list = $list->filter('ParentID', 0);
     }
     $this->extend('updateList', $list);
     return $list;
 }
开发者ID:i-lateral,项目名称:silverstripe-catalogue,代码行数:10,代码来源:CatalogueAdmin.php

示例7: getList

 public function getList()
 {
     $list = parent::getList();
     // Ensure that we only show Order objects in the order tab
     if ($this->modelClass == "Order") {
         $list = $list->addFilter(array("ClassName" => "Order"));
     }
     $this->extend("updateList", $list);
     return $list;
 }
开发者ID:i-lateral,项目名称:silverstripe-orders,代码行数:10,代码来源:OrderAdmin.php

示例8: getList

 public function getList()
 {
     $list = parent::getList();
     // use this to access search parameters
     $params = $this->request->requestVar('q');
     if ($this->modelClass == 'Contact' && isset($params['Flagged']) && $params['Flagged']) {
         $list = $list->filter("Notes.Flag", true);
     }
     return $list;
 }
开发者ID:i-lateral,项目名称:silverstripe-contacts,代码行数:10,代码来源:ContactAdmin.php

示例9: getList

 public function getList()
 {
     $list = parent::getList();
     $params = $this->request->requestVar('q');
     // use this to access search parameters
     if ($this->modelClass == 'Payment' && empty($params)) {
         $list = $list->exclude('AmountAmount', '0');
     }
     return $list;
 }
开发者ID:brettt89,项目名称:discombobulation,代码行数:10,代码来源:PaymentAdmin.php

示例10: getList

 /**
  * List only newsitems from current subsite.
  *
  * @author Marcio Barrientos
  * @return ArrayList $list
  */
 public function getList()
 {
     /** @var DataList $list */
     $list = parent::getList();
     if ($this->modelClass === 'News' && class_exists('Subsite') && Subsite::currentSubsiteID() > 0) {
         $pages = NewsHolderPage::get()->filter(array('SubsiteID' => (int) Subsite::currentSubsiteID()));
         $filter = $pages->column('ID');
         /* Manual join needed because otherwise no items are found. Unknown why. */
         $list = $list->innerJoin('NewsHolderPage_Newsitems', 'NewsHolderPage_Newsitems.NewsID = News.ID')->filter(array('NewsHolderPage_Newsitems.NewsHolderPageID' => $filter));
     }
     return $list;
 }
开发者ID:firesphere,项目名称:silverstripe-newsmodule,代码行数:18,代码来源:NewsAdmin.php

示例11: getList

 public function getList()
 {
     $list = parent::getList();
     // Filter categories
     if ($this->modelClass == 'ProductCategory') {
         $parentID = $this->request->requestVar('ParentID');
         if (!$parentID) {
             $parentID = 0;
         }
         $list = $list->filter('ParentID', $parentID);
     }
     return $list;
 }
开发者ID:helpfulrobot,项目名称:i-lateral-silverstripe-commerce,代码行数:13,代码来源:CatalogueAdmin.php

示例12: getList

 /**
  * Restrict list to non-hidden statuses
  */
 public function getList()
 {
     if ($this->modelClass == "Order") {
         $context = $this->getSearchContext();
         $params = $this->request->requestVar('q');
         //TODO update params DateTo, to include the day, ie 23:59:59
         $list = $context->getResults($params)->exclude("Status", Order::config()->hidden_status);
         //exclude hidden statuses
         $this->extend('updateList', $list);
         return $list;
     } else {
         return parent::getList();
     }
 }
开发者ID:burnbright,项目名称:silverstripe-shop,代码行数:17,代码来源:OrdersAdmin.php

示例13: getList

 public function getList()
 {
     $list = parent::getList();
     if ($this->modelClass == 'Subscription') {
         $list = $list->exclude('Member.ID', null);
     }
     if ($this->modelClass == 'CreditCard') {
         $list = $list->exclude('Member.ID', null);
     }
     if ($this->modelClass == 'Heatmaps') {
         $list = $list->exclude('Member.ID', null);
     }
     if ($this->modelClass == 'Order') {
         $list = $list->exclude('Member.ID', null);
     }
     return $list;
 }
开发者ID:hemant-chakka,项目名称:awss,代码行数:17,代码来源:DataAdmin.php

示例14: getList

 /**
  * Custom filtering on "Status"
  * @return Form
  **/
 public function getList()
 {
     $list = parent::getList();
     $r = $this->getRequest();
     if ($q = $r->requestVar('q')) {
         if (isset($q['Status'])) {
             $status = $q['Status'];
             $now = date('Y-m-d H:i:s');
             if ($status == 'Future') {
                 return $list->where("StartTime > '{$now}'");
             } elseif ($status == 'Past') {
                 return $list->where("EndTime < {$now}");
             } elseif ($status == 'Current') {
                 return $list->where("\n\t\t\t\t\t\tStartTime < '{$now}' AND \n\t\t\t\t\t\t(EndTime > '{$now}' OR EndTime IS NULL) \n\t\t\t\t\t");
             }
         }
     }
     return $list;
 }
开发者ID:helpfulrobot,项目名称:sheadawson-silverstripe-timednotices,代码行数:23,代码来源:TimedNoticeAdmin.php

示例15: getList

 public function getList()
 {
     $list = parent::getList();
     return $list;
 }
开发者ID:zarocknz,项目名称:silverstripe-mandrill,代码行数:5,代码来源:EmailTemplatesAdmin.php


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