function FormState::loadInclude
Same name in other branches
- 9 core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::loadInclude()
- 8.9.x core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::loadInclude()
- 11.x core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::loadInclude()
Overrides FormStateInterface::loadInclude
File
-
core/
lib/ Drupal/ Core/ Form/ FormState.php, line 904
Class
- FormState
- Stores information about the state of a form.
Namespace
Drupal\Core\FormCode
public function loadInclude($module, $type, $name = NULL) {
if (!isset($name)) {
$name = $module;
}
$build_info = $this->getBuildInfo();
if (!isset($build_info['files']["{$module}:{$name}.{$type}"])) {
// Only add successfully included files to the form state.
if ($result = $this->moduleLoadInclude($module, $type, $name)) {
$build_info['files']["{$module}:{$name}.{$type}"] = [
'type' => $type,
'module' => $module,
'name' => $name,
];
$this->setBuildInfo($build_info);
return $result;
}
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.