diff --git a/core/lib/Drupal/Core/Entity/EntityFormController.php b/core/lib/Drupal/Core/Entity/EntityFormController.php index 4a03975..2a31bf7 100644 --- a/core/lib/Drupal/Core/Entity/EntityFormController.php +++ b/core/lib/Drupal/Core/Entity/EntityFormController.php @@ -80,6 +80,10 @@ public function form(array $form, array &$form_state, EntityInterface $entity) { if (!empty($info['fieldable'])) { field_attach_form($entity, $form, $form_state, $this->getFormLangcode($form_state)); } + $form['langcode'] = array( + '#type' => 'value', + '#value' => !$entity->isNew() ? $entity->langcode : language_default()->langcode, + ); return $form; } diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.php index db90ff0..77664e9 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.php @@ -37,10 +37,6 @@ public function form(array $form, array &$form_state, EntityInterface $block_typ ), '#disabled' => !$block_type->isNew(), ); - $form['langcode'] = array( - '#type' => 'value', - '#value' => !$block_type->isNew() ? $block_type->langcode : language_default()->langcode, - ); $form['description'] = array( '#type' => 'textarea', diff --git a/core/modules/block/lib/Drupal/block/BlockBase.php b/core/modules/block/lib/Drupal/block/BlockBase.php index 18f7c23..4de2a59 100644 --- a/core/modules/block/lib/Drupal/block/BlockBase.php +++ b/core/modules/block/lib/Drupal/block/BlockBase.php @@ -259,10 +259,6 @@ public function form($form, &$form_state) { '#required' => TRUE, '#disabled' => !$entity->isNew(), ); - $form['langcode'] = array( - '#type' => 'value', - '#value' => !$entity->isNew() ? $entity->langcode : language_default()->langcode, - ); // Region settings. $form['region'] = array( diff --git a/core/modules/contact/lib/Drupal/contact/CategoryFormController.php b/core/modules/contact/lib/Drupal/contact/CategoryFormController.php index 4b301e8..d60308f 100644 --- a/core/modules/contact/lib/Drupal/contact/CategoryFormController.php +++ b/core/modules/contact/lib/Drupal/contact/CategoryFormController.php @@ -39,10 +39,6 @@ public function form(array $form, array &$form_state, EntityInterface $category) ), '#disabled' => !$category->isNew(), ); - $form['langcode'] = array( - '#type' => 'value', - '#value' => !$category->isNew() ? $category->langcode : language_default()->langcode, - ); $form['recipients'] = array( '#type' => 'textarea', '#title' => t('Recipients'), diff --git a/core/modules/filter/filter.admin.inc b/core/modules/filter/filter.admin.inc index 12fc730..246f286 100644 --- a/core/modules/filter/filter.admin.inc +++ b/core/modules/filter/filter.admin.inc @@ -169,6 +169,7 @@ function filter_admin_format_form($form, &$form_state, $format) { '#disabled' => !empty($format->format), '#weight' => -20, ); + // @todo Remove once moved to FilterFormatFormController. $form['langcode'] = array( '#type' => 'value', '#value' => !$format->isNew() ? $format->langcode : language_default()->langcode, diff --git a/core/modules/user/user.admin.inc b/core/modules/user/user.admin.inc index 1b1e792..882cef2 100644 --- a/core/modules/user/user.admin.inc +++ b/core/modules/user/user.admin.inc @@ -1004,6 +1004,7 @@ function user_admin_role($form, $form_state, $role) { 'source' => array('role', 'label'), ), ); + // @todo Remove once moved to RoleFormController. $form['role']['langcode'] = array( '#type' => 'value', '#value' => !$role->isNew() ? $role->langcode : language_default()->langcode,