function ContentEntityForm::getFormLangcode

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/ContentEntityForm.php \Drupal\Core\Entity\ContentEntityForm::getFormLangcode()
  2. 10 core/lib/Drupal/Core/Entity/ContentEntityForm.php \Drupal\Core\Entity\ContentEntityForm::getFormLangcode()
  3. 8.9.x core/lib/Drupal/Core/Entity/ContentEntityForm.php \Drupal\Core\Entity\ContentEntityForm::getFormLangcode()

File

core/lib/Drupal/Core/Entity/ContentEntityForm.php, line 316

Class

ContentEntityForm
Entity form variant for content entity types.

Namespace

Drupal\Core\Entity

Code

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.