Callbacks.php
Same filename in this branch
Same filename in other branches
- 9 core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php
- 9 core/modules/system/tests/modules/form_test/src/Callbacks.php
- 8.9.x core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php
- 8.9.x core/modules/system/tests/modules/form_test/src/Callbacks.php
- 10 core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php
- 10 core/modules/system/tests/modules/form_test/src/Callbacks.php
Namespace
Drupal\entity_testFile
-
core/
modules/ system/ tests/ modules/ entity_test/ src/ Callbacks.php
View source
<?php
declare (strict_types=1);
namespace Drupal\entity_test;
use Drupal\Core\Form\FormStateInterface;
/**
* Simple object with callbacks.
*/
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);
}
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
Callbacks | Simple object with callbacks. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.