yii\rbac\ManagerInterface::update PHP 메소드

update() 공개 메소드

Updates the specified role, permission or rule in the system.
public update ( string $name, Role | Permission | Rule $object ) : boolean
$name string the old name of the role, permission or rule
$object Role | Permission | Rule
리턴 boolean whether the update is successful
    public function update($name, $object);

Usage Example

예제 #1
0
파일: Permission.php 프로젝트: apurey/cmf
 /**
  * @return bool
  */
 public function updatePermission()
 {
     if ($this->validate()) {
         $permission = $this->authManager->getPermission($this->name);
         $permission->description = $this->description;
         return $this->authManager->update($this->name, $permission);
     }
     return false;
 }
All Usage Examples Of yii\rbac\ManagerInterface::update