當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Role::setLabel方法代碼示例

本文整理匯總了PHP中Role::setLabel方法的典型用法代碼示例。如果您正苦於以下問題:PHP Role::setLabel方法的具體用法?PHP Role::setLabel怎麽用?PHP Role::setLabel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Role的用法示例。


在下文中一共展示了Role::setLabel方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: factory

 public static function factory(Storage $storage, $row)
 {
     $role = new Role($storage);
     $role->setRoleID($row["roleid"]);
     $role->setLabel($row["label"]);
     $role->setDescription($row["description"]);
     return $role;
 }
開發者ID:jungepiraten,項目名稱:vpanel,代碼行數:8,代碼來源:role.class.php

示例2: parseRoleFormular

function parseRoleFormular($session, &$role = null)
{
    $label = $session->getVariable("label");
    $description = $session->getVariable("description");
    if ($role == null) {
        $role = new Role($session->getStorage());
    }
    $role->setLabel($label);
    $role->setDescription($description);
    $role->save();
}
開發者ID:jungepiraten,項目名稱:vpanel,代碼行數:11,代碼來源:roles.php

示例3: setLabel

 public function setLabel($label)
 {
     $this->__load();
     return parent::setLabel($label);
 }
開發者ID:digvijaymohite,項目名稱:e-tender,代碼行數:5,代碼來源:__CG__Role.php

示例4: initRoles

 function initRoles()
 {
     $roleFunctionViewFund = new Rolefunction();
     $roleFunctionViewFund->setName("VIEW_FUND");
     $this->em->persist($roleFunctionViewFund);
     $roleFunctionAddFund = new Rolefunction();
     $roleFunctionAddFund->setName("ADD_FUND");
     $this->em->persist($roleFunctionAddFund);
     $roleFunctionAddProject = new Rolefunction();
     $roleFunctionAddProject->setName("ADD_PROJECT");
     $this->em->persist($roleFunctionAddProject);
     $roleFunctionViewTechSanction = new Rolefunction();
     $roleFunctionViewTechSanction->setName("VIEW_TECH_SANCTION");
     $this->em->persist($roleFunctionViewTechSanction);
     $roleFunctionViewTechSanctionApprove = new Rolefunction();
     $roleFunctionViewTechSanctionApprove->setName("APPROVE_TECH_SANCTION");
     $this->em->persist($roleFunctionViewTechSanctionApprove);
     $roleFunctionTenderView = new Rolefunction();
     $roleFunctionTenderView->setName("VIEW_TENDER");
     $this->em->persist($roleFunctionTenderView);
     $roleFunctionTenderApprove = new Rolefunction();
     $roleFunctionTenderApprove->setName("APPROVE_TENDER");
     $this->em->persist($roleFunctionTenderApprove);
     $roleFunctionWorkOrderView = new Rolefunction();
     $roleFunctionWorkOrderView->setName("VIEW_WORK_ORDER");
     $this->em->persist($roleFunctionWorkOrderView);
     $roleFunctionWorkOrderApprove = new Rolefunction();
     $roleFunctionWorkOrderApprove->setName("APPROVE_WORK_ORDER");
     $this->em->persist($roleFunctionWorkOrderApprove);
     $roleFunctionBillView = new Rolefunction();
     $roleFunctionBillView->setName("VIEW_BILL");
     $this->em->persist($roleFunctionBillView);
     $roleFunctionBillApprove = new Rolefunction();
     $roleFunctionBillApprove->setName("APPROVE_BILL");
     $this->em->persist($roleFunctionBillApprove);
     $roleFunctionCompleteView = new Rolefunction();
     $roleFunctionCompleteView->setName("VIEW_COMPLETED");
     $this->em->persist($roleFunctionCompleteView);
     $roleFunctionManageContractor = new Rolefunction();
     $roleFunctionManageContractor->setName("MANAGE_CONTRACTOR");
     $this->em->persist($roleFunctionManageContractor);
     $roleFunctionManageUser = new Rolefunction();
     $roleFunctionManageUser->setName("MANAGE_USER");
     $this->em->persist($roleFunctionManageUser);
     $roleFunctionAdminApproval = new Rolefunction();
     $roleFunctionAdminApproval->setName("VIEW_ADMIN_APPROVAL");
     $this->em->persist($roleFunctionAdminApproval);
     //Adding Roles
     $admin = new Role();
     $admin->setName("ADMIN");
     $admin->setLabel("Administrator");
     $admin->getRoleFunction()->add($roleFunctionViewFund);
     $admin->getRoleFunction()->add($roleFunctionAddFund);
     $admin->getRoleFunction()->add($roleFunctionAddProject);
     $admin->getRoleFunction()->add($roleFunctionViewTechSanction);
     $admin->getRoleFunction()->add($roleFunctionViewTechSanctionApprove);
     $admin->getRoleFunction()->add($roleFunctionTenderView);
     $admin->getRoleFunction()->add($roleFunctionTenderApprove);
     $admin->getRoleFunction()->add($roleFunctionWorkOrderView);
     $admin->getRoleFunction()->add($roleFunctionWorkOrderApprove);
     $admin->getRoleFunction()->add($roleFunctionBillView);
     $admin->getRoleFunction()->add($roleFunctionBillApprove);
     $admin->getRoleFunction()->add($roleFunctionCompleteView);
     $admin->getRoleFunction()->add($roleFunctionManageContractor);
     $admin->getRoleFunction()->add($roleFunctionManageUser);
     $admin->getRoleFunction()->add($roleFunctionAdminApproval);
     $this->em->persist($admin);
     $technical = new Role();
     $technical->setName("TECHNICAL");
     $technical->setLabel("Technical Approval");
     $technical->getRoleFunction()->add($roleFunctionViewTechSanction);
     $technical->getRoleFunction()->add($roleFunctionViewTechSanctionApprove);
     $this->em->persist($technical);
     $tendor = new Role();
     $tendor->setName("TENDOR");
     $tendor->setLabel("Tendor Approval");
     $tendor->getRoleFunction()->add($roleFunctionTenderView);
     $tendor->getRoleFunction()->add($roleFunctionTenderApprove);
     $tendor->getRoleFunction()->add($roleFunctionManageContractor);
     $this->em->persist($tendor);
     $deptEngineer = new Role();
     $deptEngineer->setName("DEPT_ENGINEER");
     $deptEngineer->setLabel("Dept. Engineer");
     $deptEngineer->getRoleFunction()->add($roleFunctionWorkOrderView);
     $deptEngineer->getRoleFunction()->add($roleFunctionWorkOrderApprove);
     $deptEngineer->getRoleFunction()->add($roleFunctionCompleteView);
     $deptEngineer->getRoleFunction()->add($roleFunctionBillView);
     $this->em->persist($deptEngineer);
     $this->em->flush();
     echo "Roles Created..!";
 }
開發者ID:digvijaymohite,項目名稱:e-tender,代碼行數:91,代碼來源:Schema.php


注:本文中的Role::setLabel方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。