当前位置: 首页>>代码示例>>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;未经允许,请勿转载。