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


PHP Roles::get_multiple方法代码示例

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


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

示例1: switch

 function generate_inner_html()
 {
     switch ($this->mode) {
         default:
             $inner_template = dirname(__FILE__) . '/center_inner_private.tpl';
     }
     $inner_html_gen =& new Template($inner_template);
     $role = new Roles();
     $this->links = $role->get_multiple();
     $inner_html_gen->set('links', $this->links);
     $inner_html_gen->set('display', @$this->display);
     $inner_html_gen->set('super_user_and_mothership', @$this->super_user_and_mothership);
     $inner_html_gen->set('config_navigation_url', network_config_navigation('manage_roles'));
     $inner_html = $inner_html_gen->fetch();
     return $inner_html;
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:16,代码来源:RoleManageModule.php

示例2: switch

 function generate_inner_html()
 {
     switch ($this->mode) {
         default:
             $inner_template = PA::$blockmodule_path . '/' . get_class($this) . '/center_inner_private.tpl';
     }
     $inner_html_gen = new Template($inner_template);
     $role = new Roles();
     $params = array('sort_by' => 'id', 'direction' => 'ASC', 'cnt' => false);
     $this->links = $role->get_multiple($params);
     $inner_html_gen->set('links', $this->links);
     $task = Tasks::get_instance();
     $tasklist = $task->get_tasks();
     $inner_html_gen->set('tasklist', $tasklist);
     $inner_html_gen->set('super_user_and_mothership', @$this->super_user_and_mothership);
     $inner_html_gen->set('config_navigation_url', network_config_navigation('manage_tasks_relationship'));
     $inner_html = $inner_html_gen->fetch();
     return $inner_html;
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:19,代码来源:TaskRoleManageModule.php

示例3: switch

 function generate_inner_html()
 {
     switch ($this->mode) {
         default:
             $inner_template = PA::$blockmodule_path . '/' . get_class($this) . '/center_inner_private.tpl';
     }
     $Pagination = new Pagination();
     $Pagination->setPaging($this->Paging);
     $this->page_first = $Pagination->getFirstPage();
     $this->page_last = $Pagination->getLastPage();
     $this->page_links = $Pagination->getPageLinks();
     $role = new Roles();
     $this->role_links = $role->get_multiple(null, DB_FETCHMODE_ASSOC);
     $inner_html_gen = new Template($inner_template);
     $inner_html_gen->set('links', $this->links);
     $inner_html_gen->set('link_role', $this->role_links);
     $inner_html_gen->set('page_first', $this->page_first);
     $inner_html_gen->set('page_last', $this->page_last);
     $inner_html_gen->set('page_links', $this->page_links);
     $inner_html_gen->set('super_user_and_mothership', $this->super_user_and_mothership);
     $inner_html_gen->set('config_navigation_url', network_config_navigation('manage_user'));
     $inner_html = $inner_html_gen->fetch();
     return $inner_html;
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:24,代码来源:NetworkResultUserModule.php

示例4: switch

 function generate_inner_html()
 {
     switch ($this->mode) {
         default:
             $inner_template = dirname(__FILE__) . '/center_inner_private.tpl';
     }
     $Pagination = new Pagination();
     $Pagination->setPaging($this->Paging);
     $this->page_first = $Pagination->getFirstPage();
     $this->page_last = $Pagination->getLastPage();
     $this->page_links = $Pagination->getPageLinks();
     $role = new Roles();
     $this->role_links = $role->get_multiple();
     $inner_html_gen =& new Template($inner_template);
     $inner_html_gen->set('links', $this->links);
     $inner_html_gen->set('link_role', $this->role_links);
     $inner_html_gen->set('page_first', $this->page_first);
     $inner_html_gen->set('page_last', $this->page_last);
     $inner_html_gen->set('page_links', $this->page_links);
     $inner_html_gen->set('super_user_and_mothership', $this->super_user_and_mothership);
     $inner_html_gen->set('config_navigation_url', network_config_navigation('manage_user'));
     $inner_html = $inner_html_gen->fetch();
     return $inner_html;
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:24,代码来源:NetworkResultUserModule.php

示例5: importRolesInfo

 public function importRolesInfo()
 {
     $roles = new Roles();
     $roles_data = array();
     $roles_info = $roles->get_multiple(null, DB_FETCHMODE_ASSOC);
     foreach ($roles_info as &$role) {
         $roles_data[] = Roles::getRoleInfoByID($role['id'], DB_FETCHMODE_ASSOC);
     }
     return $roles_data;
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:10,代码来源:NetworkConfig.class.php

示例6: dirname

*/
require_once dirname(__FILE__) . '/../../config.inc';
require_once "api/Roles/Roles.php";
require_once "api/Group/Group.php";
//  echo "<pre>".print_r($_REQUEST,1)."</pre>";
$selected_role = null;
$sel_role_id = !empty($_REQUEST['role_id']) ? $_REQUEST['role_id'] : null;
$group_id = !empty($_REQUEST['gid']) && $_REQUEST['gid'] != '-1' ? $_REQUEST['gid'] : null;
$user_id = (int) $_REQUEST['uid'];
$roles_list = array();
$user_roles = array();
$user = new User();
$user->load($user_id);
$role = new Roles();
$params = $group_id ? array('condition' => 'type = \'group\'', 'cnt' => false) : array('condition' => 'type <> \'null\'', 'cnt' => false);
$all_roles = $role->get_multiple($params, DB_FETCHMODE_ASSOC);
foreach ($all_roles as $a_role) {
    $roles_list[$a_role['id']] = $a_role['name'];
}
$user_groups = array();
$u_groups = Group::get_user_groups($user_id);
if (count($u_groups) < 1) {
    $u_groups = Group::get_all_groups_for_admin(FALSE);
    foreach ($u_groups as $group) {
        $user_groups[$group['group_id']] = $group['title'];
    }
} else {
    foreach ($u_groups as $group) {
        $user_groups[$group['gid']] = $group['name'];
    }
}
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:31,代码来源:user_roles.php

示例7: testGet_multiple

 /**
  * @todo Implement testGet_multiple().
  */
 public function testGet_multiple()
 {
     $roles = Roles::get_multiple();
     $num = count($roles);
     $res = Dal::query('SELECT count(*) AS CNT FROM {admin_roles} ');
     $r = $res->fetchRow(DB_FETCHMODE_OBJECT);
     //if total rows in db are equal to rows returned by the function
     // then test is OK
     $this->assertEquals($num, $r->CNT);
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:13,代码来源:RolesTest.php

示例8: switch

 function generate_inner_html()
 {
     switch ($this->mode) {
         default:
             $inner_template = PA::$blockmodule_path . '/' . get_class($this) . '/cnmodule.php';
     }
     $inner_html_gen = new Template($inner_template);
     $role = new Roles();
     $params = array('sort_by' => 'id', 'direction' => 'ASC', 'cnt' => false);
     $this->links = $role->get_multiple($params);
     $inner_html_gen->set('links', $this->links);
     $inner_html_gen->set('display', @$this->display);
     $inner_html_gen->set('super_user_and_mothership', @$this->super_user_and_mothership);
     $inner_html_gen->set('config_navigation_url', network_config_navigation('manage_roles'));
     $inner_html = $inner_html_gen->fetch();
     return $inner_html;
 }
开发者ID:Cyberspace-Networks,项目名称:CoreSystem,代码行数:17,代码来源:CNRoleManageModule.php


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