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


PHP UserPeer::getUsergroupMemberCriteria方法代码示例

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


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

示例1: executeUsergroupIndex

 /**
  * Executes group index action
  *
  * @param sfRequest $request A request object
  */
 public function executeUsergroupIndex(sfWebRequest $request)
 {
     $this->forward404Unless($this->usergroup = UsergroupPeer::retrieveByPk($request->getParameter('usergroupId')), sprintf('Object usergroup does not exist (%s).', $request->getParameter('usergroupId')));
     $this->forward404Unless($this->user = $this->getUser()->getTemposUser(), 'No user logged-in.');
     $this->forward404Unless($this->getUser()->getTemposUser()->isLeader($this->usergroup), 'The logged user is not leader of the specified usergroup.');
     $this->form = new UserSearchForm();
     $formName = $this->form->getName();
     $this->form->setIsActive(null);
     $this->form->setCardNumber(null);
     $this->form->setUsergroupsAsLeader(null);
     $this->form->setUsergroupsAsMember(null);
     $this->getUser()->syncParameters($this, 'home', 'usergroupIndex', array($formName, 'sort_column', 'sort_direction'), $request);
     if (is_null($this->sort_column)) {
         $this->sort_column = 'name';
         $this->sort_direction = 'up';
     }
     $c = new Criteria();
     SortCriteria::addSortCriteria($c, $this->sort_column, UserPeer::getSortAliases(), $this->sort_direction);
     if (!is_null($this->{$formName})) {
         $this->filtered = true;
         $this->form->bind($this->{$formName}, $request->getFiles($formName));
         $c = UserPeer::getUsergroupMemberCriteria($this->usergroup->getId(), $c);
         if ($this->form->isValid()) {
             $this->user_list = UserPeer::searchUsers($this->form->getValue('login'), $this->form->getValue('family_name'), $this->form->getValue('surname'), $this->form->getValue('usergroupsAsLeader'), $this->form->getValue('usergroupsAsMember'), $this->form->getValue('activities'), $this->form->getValue('is_active'), $this->form->getValue('card_number'), $this->form->getValue('year_min'), $this->form->getValue('year_max'), $this->form->getValue('email_address'), $this->form->getValue('address'), $this->form->getValue('phone_number'), $c);
         }
     }
     if (!isset($this->user_list)) {
         $this->filtered = false;
         $this->user_list = $this->usergroup->getMembers();
     }
     $this->count = count($this->user_list);
     $this->getUser()->setAttribute('usergroupId', $this->usergroup->getId());
 }
开发者ID:jfesquet,项目名称:tempos,代码行数:38,代码来源:actions.class.php

示例2: getMembersCount

 public function getMembersCount($c = null)
 {
     $c = UserPeer::getUsergroupMemberCriteria($this->getId(), $c);
     return UserPeer::doCount($c);
 }
开发者ID:jfesquet,项目名称:tempos,代码行数:5,代码来源:Usergroup.php


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