original_string: public function cmdPermAddRole()
      {
          list($role_id, $existing, $submitted) = $this->getPermissionsRole();
  
          $data = array('permissions' => array_unique(array_merge($existing, $submitted)));
  
          $this->setSubmitted(null, $data);
          $this->setSubmitted('update', $role_id);
  
          $this->validateComponent('user_role');
  
          $this->updateRole($role_id);
          $this->output();
      }
code: public function cmdPermAddRole()
      {
          list($role_id, $existing, $submitted) = $this->getPermissionsRole();
  
          $data = array('permissions' => array_unique(array_merge($existing, $submitted)));
  
          $this->setSubmitted(null, $data);
          $this->setSubmitted('update', $role_id);
  
          $this->validateComponent('user_role');
  
          $this->updateRole($role_id);
          $this->output();
      }
code_tokens: public function cmdPermAddRole ( ) { list ( $ role_id , $ existing , $ submitted ) = $ this -> getPermissionsRole ( ) ; $ data = array ( 'permissions' => array_unique ( array_merge ( $ existing , $ submitted ) ) ) ; $ this -> setSubmitted ( null , $ data ) ; $ this -> setSubmitted ( 'update' , $ role_id ) ; $ this -> validateComponent ( 'user_role' ) ; $ this -> updateRole ( $ role_id ) ; $ this -> output ( ) ; }
docstring: Callback for "role-perm-add" command
docstring_tokens: Callback for role - perm - add command