/** * Edit role * * @param integer $roleId * @param array $roleInfo * string name * @return boolean|string */ public function editRole($roleId, array $roleInfo) { try { $this->adapter->getDriver()->getConnection()->beginTransaction(); $update = $this->update()->table('acl_role')->set($roleInfo)->where(['id' => $roleId]); $statement = $this->prepareStatementForSqlObject($update); $statement->execute(); $this->adapter->getDriver()->getConnection()->commit(); } catch (Exception $e) { $this->adapter->getDriver()->getConnection()->rollback(); ApplicationErrorLogger::log($e); return $e->getMessage(); } // fire the edit acl role event AclEvent::fireEditAclRoleEvent($roleId); return true; }