ContentEntityForm::getFormLangcode

public ContentEntityForm::getFormLangcode(FormStateInterface $form_state)

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

File

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

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');
}
doc_Drupal
2016-10-29 08:57:16
Comments
Leave a Comment

Please login to continue.