function FormTestMachineNameValidationForm::load
Loading stub for machine name.
Parameters
string $machine_name: The machine name.
Return value
bool TRUE if the machine name is a duplicate, FALSE otherwise.
File
-
core/
modules/ system/ tests/ modules/ form_test/ src/ Form/ FormTestMachineNameValidationForm.php, line 131
Class
- FormTestMachineNameValidationForm
- Form to test whether machine name validation works with ajax requests.
Namespace
Drupal\form_test\FormCode
public function load($machine_name) {
if (str_contains($machine_name, 'duplicate')) {
return TRUE;
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.