本文整理汇总了PHP中Roles::getRoleName方法的典型用法代码示例。如果您正苦于以下问题:PHP Roles::getRoleName方法的具体用法?PHP Roles::getRoleName怎么用?PHP Roles::getRoleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Roles
的用法示例。
在下文中一共展示了Roles::getRoleName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: emailToUser
/**
* [emailToUser Send Email to user for report user status]
* @param [type] $email [user email]
* @param [type] $name [user name]
* @param [type] $status [user status]
* @return [type] [description]
*/
public function emailToUser($email, $name, $status, $group, $role)
{
if ($status == 'yes') {
$status = 'เปิดใช้งาน';
} else {
$status = 'ปิดการใช้งาน';
}
$role_obj = new Roles();
$_role = $role_obj->getRoleName($role);
$grp_obj = new Usergroup();
$_grp = $grp_obj->getGrpName($group);
//var_dump($_grp);exit;
Mail::send('userlist.email', array("name" => $name, "status" => $status, "group" => $_grp->grp_nameth, "role" => $_role->role_name), function ($message) use($email) {
$message->to($email, 'Admin@NHC')->subject('Your status @NHC');
});
}
示例2: getRoleName
public function getRoleName()
{
$this->__load();
return parent::getRoleName();
}
示例3: roleReport
/**
* [roleReport description]
* @param string $roleid [description]
* @param string $flag [description]
* @param string $type [description]
* @return [type] [description]
*/
public function roleReport($roleid = "", $flag = "", $type = "")
{
$training = new UserTraining();
if ($roleid == '') {
$roles = Roles::all();
//var_dump($roles[0]);exit;
return View::make('train.reportrole')->with('rs', $roles);
} else {
if ($roleid != '' and $flag == '') {
$rs = $training->getUserTrainByRoleId($roleid);
// var_dump($rs);exit;
return View::make('train.reportrole_ajax')->with('rs', $rs)->with('role_id', $roleid);
} else {
$role_obj = new Roles();
$this->rolename = $role_obj->getRoleName($roleid)->role_name;
$rs = $training->getUserTrainByRoleId($roleid);
$this->exportXls($rs, $type);
}
}
}