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


PHP ControllerBase::listAll方法代码示例

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


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

示例1: listAll

 /**
  * @remotable
  */
 public function listAll($a)
 {
     $return = parent::listAll($a);
     if (!isset($return["items"])) {
         return $return;
     }
     $items = $return["items"];
     $user = $this->getSessionValue("contactID");
     for ($i = 0; $i < count($items); $i++) {
         $items[$i]["colorCode"] = $this->getUserColorCode($user);
     }
     $return["items"] = $items;
     return $return;
 }
开发者ID:unixmiah,项目名称:codeigniter-doctrine-extjs,代码行数:17,代码来源:SiteConfigurationAPI.php

示例2: listAll

 /**
  * @remotable
  */
 public function listAll($a)
 {
     $return = parent::listAll($a);
     if (!isset($return["items"])) {
         return $return;
     }
     $items = $return["items"];
     for ($i = 0; $i < count($items); $i++) {
         $items[$i]["genderName"] = $items[$i]["gender"] == 1 ? "male" : "female";
         $items[$i]["age"] = $this->calculateAge($items[$i]["birthDate"]);
     }
     $return["items"] = $items;
     return $return;
 }
开发者ID:unixmiah,项目名称:codeigniter-doctrine-extjs,代码行数:17,代码来源:ClientAPI.php

示例3: listAll

 /**
  * @remotable
  */
 public function listAll($a)
 {
     if (isset($a->dateNeeded)) {
         $dateNeeded = $a->dateNeeded;
     } else {
         $dateNeeded = "null";
     }
     if ($this->getSessionValue('isDesktop') == 1) {
         $prev = parent::listAll($a);
         return $prev;
     } else {
         if ($dateNeeded == "null") {
             //Current date
             $currentDate = date("Y-m-d");
             //Get week range from given date
             $weekRange = $this->getWeekRange($currentDate, $start = true);
             $weekRange = explode("|", $weekRange);
             $startDate = $weekRange[0];
             $endDate = $weekRange[1];
         } else {
             //Current date
             $dateNeeded = explode("T", $dateNeeded);
             //Get week range from given date
             $currentDate = $dateNeeded[0];
             //Get week range from given date
             $weekRange = $this->getWeekRange($currentDate, $start = true);
             $weekRange = explode("|", $weekRange);
             $startDate = $weekRange[0];
             $endDate = $weekRange[1];
         }
         $orgID = $this->getOrgID();
         $query = "SELECT * FROM observ_detail AS obs\r\n\t\tWHERE obs.actDetailID IN\r\n        (SELECT id FROM activity_detail where\r\n          actDtlStime >= '{$startDate}' and\r\n          actDtlEtime <= '{$endDate}' and orgId= {$orgID}\r\n        )";
         $q = Doctrine_Manager::getInstance()->getCurrentConnection();
         $result = $q->execute($query);
         $result = $result->fetchAll();
         $total = sizeof($result);
         $newRes = array();
         foreach ($result as $key => $value) {
             $newRes[] = $value;
         }
         $this->response['total'] = $total;
         $this->response['success'] = true;
         if ($this->response['total'] > 0) {
             $this->response['items'] = $newRes;
         } else {
             $this->response['items'] = array();
         }
         return $this->response;
     }
 }
开发者ID:unixmiah,项目名称:codeigniter-doctrine-extjs,代码行数:53,代码来源:ObservationAPI.php


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