本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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'];
}
}
示例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);
}
示例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;
}