当前位置: 首页>>代码示例>>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;未经允许,请勿转载。