當前位置: 首頁>>代碼示例>>PHP>>正文


PHP sfGuardGroupPeer::doSelect方法代碼示例

本文整理匯總了PHP中sfGuardGroupPeer::doSelect方法的典型用法代碼示例。如果您正苦於以下問題:PHP sfGuardGroupPeer::doSelect方法的具體用法?PHP sfGuardGroupPeer::doSelect怎麽用?PHP sfGuardGroupPeer::doSelect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在sfGuardGroupPeer的用法示例。


在下文中一共展示了sfGuardGroupPeer::doSelect方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: retrieveForUserWithoutCurrentRole

 /**
  *Returns all roles (groups) $user_id has, excepting current one $current_role
  *
  */
 public static function retrieveForUserWithoutCurrentRole($current_role, $user_id)
 {
     $c = new Criteria();
     $c->add(self::USER_ID, $user_id);
     $c->addJoin(self::GROUP_ID, sfGuardGroupPeer::ID);
     $c->add(sfGuardGroupPeer::NAME, $current_role, Criteria::NOT_EQUAL);
     return sfGuardGroupPeer::doSelect($c);
 }
開發者ID:nvidela,項目名稱:kimkelen,代碼行數:12,代碼來源:sfGuardUserGroupPeer.php

示例2: executeJsonList

 public function executeJsonList(sfWebRequest $request)
 {
     $c = new Criteria();
     $groups = sfGuardGroupPeer::doSelect($c);
     $elements = array();
     foreach ($groups as $group) {
         $elements[] = $group->toArray();
     }
     $return = array('data' => $elements);
     $result = json_encode($return);
     $this->getResponse()->setHttpHeader('Content-type', 'application/json');
     return $this->renderText($result);
 }
開發者ID:ketheriel,項目名稱:ETVA,代碼行數:13,代碼來源:actions.class.php

示例3: retrieveByPKs

 /**
  * Retrieve multiple objects by pkey.
  *
  * @param      array $pks List of primary keys
  * @param      PropelPDO $con the connection to use
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function retrieveByPKs($pks, PropelPDO $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(sfGuardGroupPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(sfGuardGroupPeer::DATABASE_NAME);
         $criteria->add(sfGuardGroupPeer::ID, $pks, Criteria::IN);
         $objs = sfGuardGroupPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
開發者ID:soltis,項目名稱:Mieszalnia,代碼行數:23,代碼來源:BasesfGuardGroupPeer.php

示例4: Criteria

<?php

// TBB (tom@punkave.com): filters by group.
$groups = sfGuardGroupPeer::doSelect(new Criteria());
$fgroups = isset($filters['groups']) ? $filters['groups'] : array();
?>
<span class="groups_filter">
<?php 
foreach ($groups as $group) {
    ?>
  <div class="groups_filter_group">
  <?php 
    echo checkbox_tag('filters[groups][]', $group->getId(), in_array($group->getId(), $fgroups));
    ?>
    <span class="groups_filter_group_label">
    <?php 
    echo $group->getName();
    ?>
    </span>
  </div>
<?php 
}
?>
</span>
開發者ID:soon0009,項目名稱:EMS,代碼行數:24,代碼來源:_groups.php


注:本文中的sfGuardGroupPeer::doSelect方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。