function ContentEntityForm::isDefaultFormLangcode

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

Overrides ContentEntityFormInterface::isDefaultFormLangcode

File

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

Class

ContentEntityForm
Entity form variant for content entity types.

Namespace

Drupal\Core\Entity

Code

public function isDefaultFormLangcode(FormStateInterface $form_state) {
    $this->initFormLangcodes($form_state);
    return $form_state->get('langcode') == $form_state->get('entity_default_langcode');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.