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


PHP PersonPeer::getCounties方法代码示例

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


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

示例1: processFilter

 /**
  * Searches for members by filter
  */
 private function processFilter(sfWebRequest $request)
 {
     $params = $this->getUser()->getAttribute('member', array(), 'person');
     if (!isset($params['firstname'])) {
         $params['firstname'] = null;
     }
     if (!isset($params['lastname'])) {
         $params['lastname'] = null;
     }
     if (!isset($params['city'])) {
         $params['city'] = null;
     }
     if (!isset($params['state'])) {
         $params['state'] = null;
     }
     if (!isset($params['country'])) {
         $params['country'] = null;
     }
     if (!isset($params['wing_name'])) {
         $params['wing_name'] = null;
     }
     if (!isset($params['active'])) {
         $params['active'] = null;
     }
     if (!isset($params['flight_status'])) {
         $params['flight_status'] = null;
     }
     $this->max_array = array(5, 10, 20, 30);
     $this->countries = PersonPeer::getCounties();
     $this->flight_statuses = sfConfig::get('app_flight_statuses');
     $this->wings = WingPeer::getNames();
     if (in_array($request->getParameter('max'), $this->max_array)) {
         $params['max'] = $request->getParameter('max');
     } else {
         if (!isset($params['max'])) {
             $params['max'] = sfConfig::get('app_max_person_per_page', 10);
         }
     }
     if ($request->hasParameter('filter')) {
         $params['firstname'] = $request->getParameter('firstname');
         $params['lastname'] = $request->getParameter('lastname');
         $params['city'] = $request->getParameter('city');
         $params['state'] = $request->getParameter('state');
         $params['country'] = in_array($request->getParameter('country'), array_keys($this->countries)) ? $request->getParameter('country') : '';
         $params['wing_name'] = in_array($request->getParameter('wing_name'), array_keys($this->wings)) ? $request->getParameter('wing_name') : '';
         $params['active'] = $request->getParameter('active');
         $params['flight_status'] = in_array($request->getParameter('flight_status'), array_keys($this->flight_statuses)) ? $request->getParameter('flight_status') : '';
     }
     $this->page = $page = $request->getParameter('page', 1);
     $this->max = $params['max'];
     $this->member_Ex_id = $request->getParameter('member_Ex_id', null);
     $this->firstname = $params['firstname'];
     $this->lastname = $params['lastname'];
     $this->city = $params['city'];
     $this->state = $params['state'];
     $this->country = $params['country'];
     $this->wing_name = $params['wing_name'];
     $this->active = $params['active'];
     $this->flight_status = $params['flight_status'];
     $this->getUser()->setAttribute('member', $params, 'person');
 }
开发者ID:yasirgit,项目名称:afids,代码行数:64,代码来源:actions.class.php


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