original_string: public static function get_forum_access_information_returns() {
  
          $structure = array(
              'warnings' => new external_warnings()
          );
  
          $capabilities = load_capability_def('mod_forum');
          foreach ($capabilities as $capname => $capdata) {
              // Get fields like cansubmit so it is consistent with the access_information function implemented in other modules.
              $field = 'can' . str_replace('mod/forum:', '', $capname);
              $structure[$field] = new external_value(PARAM_BOOL, 'Whether the user has the capability ' . $capname . ' allowed.',
                  VALUE_OPTIONAL);
          }
  
          return new external_single_structure($structure);
      }
code: public static function get_forum_access_information_returns() {
  
          $structure = array(
              'warnings' => new external_warnings()
          );
  
          $capabilities = load_capability_def('mod_forum');
          foreach ($capabilities as $capname => $capdata) {
              // Get fields like cansubmit so it is consistent with the access_information function implemented in other modules.
              $field = 'can' . str_replace('mod/forum:', '', $capname);
              $structure[$field] = new external_value(PARAM_BOOL, 'Whether the user has the capability ' . $capname . ' allowed.',
                  VALUE_OPTIONAL);
          }
  
          return new external_single_structure($structure);
      }
code_tokens: public static function get_forum_access_information_returns ( ) { $ structure = array ( 'warnings' => new external_warnings ( ) ) ; $ capabilities = load_capability_def ( 'mod_forum' ) ; foreach ( $ capabilities as $ capname => $ capdata ) { // Get fields like cansubmit so it is consistent with the access_information function implemented in other modules. $ field = 'can' . str_replace ( 'mod/forum:' , '' , $ capname ) ; $ structure [ $ field ] = new external_value ( PARAM_BOOL , 'Whether the user has the capability ' . $ capname . ' allowed.' , VALUE_OPTIONAL ) ; } return new external_single_structure ( $ structure ) ; }
docstring: Describes the get_forum_access_information return value.
  
  @return external_single_structure
  @since Moodle 3.7
docstring_tokens: Describes the get_forum_access_information return value .