class Callbacks

Same name in this branch
  1. main core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php \Drupal\ajax_forms_test\Callbacks
  2. main core/modules/system/tests/modules/form_test/src/Callbacks.php \Drupal\form_test\Callbacks
Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/entity_test/src/Callbacks.php \Drupal\entity_test\Callbacks
  2. 11.x core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php \Drupal\ajax_forms_test\Callbacks
  3. 11.x core/modules/system/tests/modules/form_test/src/Callbacks.php \Drupal\form_test\Callbacks
  4. 10 core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php \Drupal\ajax_forms_test\Callbacks
  5. 10 core/modules/system/tests/modules/form_test/src/Callbacks.php \Drupal\form_test\Callbacks
  6. 9 core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php \Drupal\ajax_forms_test\Callbacks
  7. 9 core/modules/system/tests/modules/form_test/src/Callbacks.php \Drupal\form_test\Callbacks
  8. 8.9.x core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php \Drupal\ajax_forms_test\Callbacks
  9. 8.9.x core/modules/system/tests/modules/form_test/src/Callbacks.php \Drupal\form_test\Callbacks

Simple object with callbacks.

Hierarchy

Expanded class hierarchy of Callbacks

1 file declares its use of Callbacks
EntityTestHooks.php in core/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php

File

core/modules/system/tests/modules/entity_test/src/Callbacks.php, line 12

Namespace

Drupal\entity_test
View source
class Callbacks {
  
  /**
   * Validation handler for the entity_test entity form.
   */
  public static function entityTestFormValidate(array &$form, FormStateInterface $form_state) : void {
    $form['#entity_test_form_validate'] = TRUE;
  }
  
  /**
   * Validation handler for the entity_test entity form.
   */
  public static function entityTestFormValidateCheck(array &$form, FormStateInterface $form_state) : void {
    if (!empty($form['#entity_test_form_validate'])) {
      \Drupal::state()->set('entity_test.form.validate.result', TRUE);
    }
  }

}

Members

Title Sort descending Modifiers Object type Summary
Callbacks::entityTestFormValidate public static function Validation handler for the entity_test entity form.
Callbacks::entityTestFormValidateCheck public static function Validation handler for the entity_test entity form.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.