X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ffield_layout%2Ffield_layout.module;h=713e7e4aac9bbbf4c87231a23a06bb67a7f8d6f3;hp=5a5fa11a49bd1209d929037e292cd2891951c3e1;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/field_layout/field_layout.module b/web/core/modules/field_layout/field_layout.module index 5a5fa11a4..713e7e4aa 100644 --- a/web/core/modules/field_layout/field_layout.module +++ b/web/core/modules/field_layout/field_layout.module @@ -50,8 +50,7 @@ function field_layout_entity_type_alter(array &$entity_types) { */ function field_layout_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) { if ($display instanceof EntityDisplayWithLayoutInterface) { - \Drupal::classResolver()->getInstanceFromDefinition(FieldLayoutBuilder::class) - ->buildView($build, $display); + \Drupal::classResolver(FieldLayoutBuilder::class)->buildView($build, $display); } } @@ -62,8 +61,7 @@ function field_layout_form_alter(&$form, FormStateInterface $form_state, $form_i $form_object = $form_state->getFormObject(); if ($form_object instanceof ContentEntityFormInterface && $display = $form_object->getFormDisplay($form_state)) { if ($display instanceof EntityDisplayWithLayoutInterface) { - \Drupal::classResolver()->getInstanceFromDefinition(FieldLayoutBuilder::class) - ->buildForm($form, $display); + \Drupal::classResolver(FieldLayoutBuilder::class)->buildForm($form, $display); } } }