本文整理汇总了PHP中owa_coreAPI::getAllRoles方法的典型用法代码示例。如果您正苦于以下问题:PHP owa_coreAPI::getAllRoles方法的具体用法?PHP owa_coreAPI::getAllRoles怎么用?PHP owa_coreAPI::getAllRoles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类owa_coreAPI
的用法示例。
在下文中一共展示了owa_coreAPI::getAllRoles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
function render($data)
{
if ($this->get('edit')) {
$this->body->set('headline', 'Edit user profile');
$this->body->set('action', 'base.usersEdit');
$this->body->set('edit', true);
} else {
$this->body->set('headline', 'Add a new user profile');
$this->body->set('action', 'base.usersAdd');
}
//page title
$this->t->set('page_title', 'User Profile');
$this->body->set_template('users_addoredit.tpl');
$this->body->set('roles', owa_coreAPI::getAllRoles());
$this->body->set('user', $this->get('profile'));
}
示例2: render
function render($data)
{
$user = $this->get('profile');
$this->body->set('isAdmin', false);
if ($this->get('edit')) {
$this->body->set('headline', 'Edit user profile');
$this->body->set('action', 'base.usersEdit');
$this->body->set('edit', true);
$userEntity = owa_coreAPI::entityFactory('base.user');
$userEntity->load($user['id']);
$this->body->set('isAdmin', $userEntity->isOWAAdmin());
} else {
$this->body->set('headline', 'Add a new user profile');
$this->body->set('action', 'base.usersAdd');
$this->body->set('edit', false);
}
//page title
$this->t->set('page_title', 'User Profile');
$this->body->set_template('users_addoredit.tpl');
$this->body->set('roles', owa_coreAPI::getAllRoles());
$this->body->set('user', $user);
}