HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux newsites.squeezer-software.com 6.8.0-90-generic #91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 14:14:30 UTC 2025 x86_64
User: www-data (33)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/sites/orpis/modules/simpletest/tests/form_test.file.inc
<?php

/**
 * @file
 * An include file to test loading it with the form API.
 */

/**
 * Form constructor for testing FAPI file inclusion of the file specified in
 * hook_menu().
 */
function form_test_load_include_menu($form, &$form_state) {
  // Submit the form via Ajax. That way the FAPI has to care about including
  // the file specified in hook_menu().
  $ajax_wrapper_id = drupal_html_id('form-test-load-include-menu-ajax-wrapper');
  $form['ajax_wrapper'] = array(
    '#markup' => '<div id="' . $ajax_wrapper_id . '"></div>',
  );
  $form['button'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
    '#submit' => array('form_test_load_include_submit'),
    '#ajax' => array(
      'wrapper' => $ajax_wrapper_id,
      'method' => 'append',
      'callback' => 'form_test_load_include_menu_ajax',
    ),
  );
  return $form;
}

/**
 * Submit callback for the form API file inclusion test forms.
 */
function form_test_load_include_submit($form, $form_state) {
  drupal_set_message('Submit callback called.');
}

/**
 * Ajax callback for the file inclusion via menu test.
 */
function form_test_load_include_menu_ajax($form) {
  // We don't need to return anything, since #ajax['method'] is 'append', which
  // does not remove the original #ajax['wrapper'] element, and status messages
  // are automatically added by the Ajax framework as long as there's a wrapper
  // element to add them to.
  return '';
}