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


PHP Role::setDescription方法代碼示例

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


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

 public function executeProcessNewOrgRoleForm(sfWebRequest $request)
 {
     $o = Doctrine::getTable('Organization')->find($request->getParameter('id'));
     $this->forward404Unless($o->isMy());
     $r = new Role();
     $r->setName($request->getParameter("name"));
     $r->setOrganizationId($o->getId());
     $r->setDescription($request->getParameter("description"));
     $r->save();
     $this->redirect("show/index?id=" . $o->getId());
 }
開發者ID:br00k,項目名稱:yavom,代碼行數:11,代碼來源:actions.class.php

示例4: insertRole

 function insertRole($data)
 {
     $connection = connect();
     $role = new Role();
     echo dump($data);
     $role->setRole(mysqli_real_escape_string($connection, $data['role']));
     $role->setDescription(mysqli_real_escape_string($connection, $data['description']));
     $query = "insert into role (";
     $query .= " role,description ";
     $query .= ") values( ";
     $query .= " '{$role->getRole()}','{$role->getDescription()}'";
     $query .= ")";
     $result = mysqli_query($connection, $query);
     if ($result) {
         $id = mysqli_insert_id($connection);
         return $id;
     }
     colse_connection($connection);
     return null;
 }
開發者ID:CharuniKaushalya,項目名稱:Database-Project,代碼行數:20,代碼來源:roleCon.php

示例5: setDescription

 public function setDescription($description)
 {
     $this->_load();
     return parent::setDescription($description);
 }
開發者ID:himel31,項目名稱:doctrine2yml-zfmodules,代碼行數:5,代碼來源:RoleProxy.php

示例6: executeAddRole

    /**
    * Function adds a role to database
    *
    * @param sfWebRequest $request
    * @return <type>
    */
    public function executeAddRole(sfWebRequest $request) {
        $data = $request->getPostParameters();
        if(count($data) > 2) { // some rights are set
            unset($data['userrole_title_name']);
            unset($data['hiddenfield']);
            $values = array_keys($data);

            $roleObj = new Role();
            $roleObj->setDescription($request->getParameter('userrole_title_name'));
            $roleObj->save();
            $id = $roleObj->getId();

            foreach($values as $item) {
                $rolecredObj = new CredentialRole();
                $rolecredObj->setRoleId($id);
                $rolecredObj->setCredentialId($item);
                $rolecredObj->save();
            }
        }
        else { // Only Userrole is written in textfield, nothing else
            $obj = new Role();
            $obj->setDescription($request->getParameter('userrole_title_name'));
            $obj->save();
        }
        $this->renderText('{success:true}');
        return sfView::NONE;
    }
開發者ID:rlauenroth,項目名稱:cuteflow_v3,代碼行數:33,代碼來源:actions.class.php


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