original_string: public function cmdUpdateRole()
      {
          $params = $this->getParam();
  
          if (empty($params[0]) || count($params) < 2) {
              $this->errorAndExit($this->text('Invalid command'));
          }
  
          if (!is_numeric($params[0])) {
              $this->errorAndExit($this->text('Invalid argument'));
          }
  
          $this->setSubmitted(null, $params);
          $this->setSubmittedList('permissions');
          $this->setSubmitted('update', $params[0]);
  
          $this->validateComponent('user_role');
  
          $this->updateRole($params[0]);
          $this->output();
      }
code: public function cmdUpdateRole()
      {
          $params = $this->getParam();
  
          if (empty($params[0]) || count($params) < 2) {
              $this->errorAndExit($this->text('Invalid command'));
          }
  
          if (!is_numeric($params[0])) {
              $this->errorAndExit($this->text('Invalid argument'));
          }
  
          $this->setSubmitted(null, $params);
          $this->setSubmittedList('permissions');
          $this->setSubmitted('update', $params[0]);
  
          $this->validateComponent('user_role');
  
          $this->updateRole($params[0]);
          $this->output();
      }
code_tokens: public function cmdUpdateRole ( ) { $ params = $ this -> getParam ( ) ; if ( empty ( $ params [ 0 ] ) || count ( $ params ) < 2 ) { $ this -> errorAndExit ( $ this -> text ( 'Invalid command' ) ) ; } if ( ! is_numeric ( $ params [ 0 ] ) ) { $ this -> errorAndExit ( $ this -> text ( 'Invalid argument' ) ) ; } $ this -> setSubmitted ( null , $ params ) ; $ this -> setSubmittedList ( 'permissions' ) ; $ this -> setSubmitted ( 'update' , $ params [ 0 ] ) ; $ this -> validateComponent ( 'user_role' ) ; $ this -> updateRole ( $ params [ 0 ] ) ; $ this -> output ( ) ; }
docstring: Callback for "role-update" command
docstring_tokens: Callback for role - update command