diff --git a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeAddForm.php b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeAddForm.php index 9bdf8bd..cf0854e 100644 --- a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeAddForm.php +++ b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeAddForm.php @@ -43,7 +43,6 @@ public function validate(array $form, array &$form_state) { * {@inheritdoc} */ protected function prepareEntity() { - parent::prepareEntity(); $definition = $this->entityManager->getDefinition($this->entityType); if (!$definition['fieldable'] || !isset($definition['controllers']['render'])) { throw new NotFoundHttpException(); diff --git a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php index c81caa8..6f638b7 100644 --- a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php +++ b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php @@ -64,8 +64,8 @@ public static function create(ContainerInterface $container) { /** * {@inheritdoc} */ - protected function prepareEntity() { - parent::prepareEntity(); + protected function init(array &$form_state) { + parent::init($form_state); $this->entityInfo = $this->entityManager->getDefinition($this->entity->entityType()); } diff --git a/core/modules/entity/lib/Drupal/entity/Form/EntityFormModeAddForm.php b/core/modules/entity/lib/Drupal/entity/Form/EntityFormModeAddForm.php index c052059..307baa6 100644 --- a/core/modules/entity/lib/Drupal/entity/Form/EntityFormModeAddForm.php +++ b/core/modules/entity/lib/Drupal/entity/Form/EntityFormModeAddForm.php @@ -18,7 +18,6 @@ class EntityFormModeAddForm extends EntityDisplayModeAddForm { * {@inheritdoc} */ protected function prepareEntity() { - parent::prepareEntity(); $definition = $this->entityManager->getDefinition($this->entityType); if (!$definition['fieldable'] || !isset($definition['controllers']['form'])) { throw new NotFoundHttpException(); diff --git a/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php b/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php index 9f5d1e8..40f1d1a 100644 --- a/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php +++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php @@ -41,9 +41,9 @@ public function __construct(EntityStorageControllerInterface $image_style_storag /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container) { return new static( - $container->get('plugin.manager.entity')->getStorageController($entity_type), + $container->get('plugin.manager.entity')->getStorageController('image_style'), $container->get('plugin.manager.image.effect') ); }