function ContentEntityForm::getFormLangcode
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Entity/ContentEntityForm.php \Drupal\Core\Entity\ContentEntityForm::getFormLangcode()
- 8.9.x core/lib/Drupal/Core/Entity/ContentEntityForm.php \Drupal\Core\Entity\ContentEntityForm::getFormLangcode()
- 11.x core/lib/Drupal/Core/Entity/ContentEntityForm.php \Drupal\Core\Entity\ContentEntityForm::getFormLangcode()
Gets the code identifying the active form language.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
string The form language code.
Overrides ContentEntityFormInterface::getFormLangcode
1 call to ContentEntityForm::getFormLangcode()
- ContentEntityForm::init in core/
lib/ Drupal/ Core/ Entity/ ContentEntityForm.php - Initializes the form state and the entity before the first form build.
File
-
core/
lib/ Drupal/ Core/ Entity/ ContentEntityForm.php, line 316
Class
- ContentEntityForm
- Entity form variant for content entity types.
Namespace
Drupal\Core\EntityCode
public function getFormLangcode(FormStateInterface $form_state) {
$this->initFormLangcodes($form_state);
return $form_state->get('langcode');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.