diff --git a/core/lib/Drupal/Core/Entity/ContentEntityFormController.php b/core/lib/Drupal/Core/Entity/ContentEntityFormController.php index 477ee1a..5aac3c4 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityFormController.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityFormController.php @@ -79,7 +79,7 @@ public function processForm($element, $form_state, $form) { } // Hide extra fields. - $extra_fields = field_info_extra_fields($this->entity->getEntityType()->id(), $this->entity->bundle(), 'form'); + $extra_fields = field_info_extra_fields($this->entity->getEntityTypeId(), $this->entity->bundle(), 'form'); foreach ($extra_fields as $extra_field => $info) { if (!$form_display->getComponent($extra_field)) { $element[$extra_field]['#access'] = FALSE; @@ -159,7 +159,7 @@ public function buildEntity(array $form, array &$form_state) { // Invoke all specified builders for copying form values to entity fields. if (isset($form['#entity_builders'])) { foreach ($form['#entity_builders'] as $function) { - call_user_func_array($function, array($entity->getEntityType()->id(), $entity, &$form, &$form_state)); + call_user_func_array($function, array($entity->getEntityTypeId(), $entity, &$form, &$form_state)); } } diff --git a/core/modules/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountFormController.php index bb775b5..f1c8b92 100644 --- a/core/modules/user/lib/Drupal/user/AccountFormController.php +++ b/core/modules/user/lib/Drupal/user/AccountFormController.php @@ -61,8 +61,8 @@ public function __construct(EntityManagerInterface $entity_manager, ContentEntit public static function create(ContainerInterface $container) { return new static( $container->get('entity.manager'), - $container->get('language_manager'), $container->get('entity.content.form_helper'), + $container->get('language_manager'), $container->get('entity.query') ); } diff --git a/core/modules/user/lib/Drupal/user/ProfileFormController.php b/core/modules/user/lib/Drupal/user/ProfileFormController.php index 325f02b..5134e6d 100644 --- a/core/modules/user/lib/Drupal/user/ProfileFormController.php +++ b/core/modules/user/lib/Drupal/user/ProfileFormController.php @@ -11,6 +11,8 @@ use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\Query\QueryFactory; use Drupal\Core\Language\LanguageManager; +use Drupal\Core\Entity\ContentEntityFormHelper; + /** * Form controller for the profile forms. @@ -20,8 +22,8 @@ class ProfileFormController extends AccountFormController { /** * {@inheritdoc} */ - public function __construct(EntityManagerInterface $entity_manager, LanguageManager $language_manager, QueryFactory $entity_query) { - parent::__construct($entity_manager, $language_manager, $entity_query); + public function __construct(EntityManagerInterface $entity_manager, ContentEntityFormHelper $entity_form_helper, LanguageManager $language_manager, QueryFactory $entity_query) { + parent::__construct($entity_manager, $entity_form_helper, $language_manager, $entity_query); } /**