yii\rbac\ManagerInterface::update PHP Method

update() public method

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
return boolean whether the update is successful
    public function update($name, $object);

Usage Example

Beispiel #1
0
 /**
  * @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