Loading src/Plugin/Field/FieldFormatter/PickupAddressDefaultFormatter.php +5 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,11 @@ class PickupAddressDefaultFormatter extends AddressDefaultFormatter { public function viewElements(FieldItemListInterface $items, $langcode) { $elements = parent::viewElements($items, $langcode); $profile = $items->getEntity(); $elements[0]['#profile_type'] = $profile->bundle(); $profile_type = $profile->bundle(); if ($profile_type !== 'pickup') { return $elements; } $elements[0]['#profile_type'] = $profile_type; $manager = \Drupal::entityTypeManager(); if ($id = $profile->getData('pickup_profile_id')) { Loading Loading
src/Plugin/Field/FieldFormatter/PickupAddressDefaultFormatter.php +5 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,11 @@ class PickupAddressDefaultFormatter extends AddressDefaultFormatter { public function viewElements(FieldItemListInterface $items, $langcode) { $elements = parent::viewElements($items, $langcode); $profile = $items->getEntity(); $elements[0]['#profile_type'] = $profile->bundle(); $profile_type = $profile->bundle(); if ($profile_type !== 'pickup') { return $elements; } $elements[0]['#profile_type'] = $profile_type; $manager = \Drupal::entityTypeManager(); if ($id = $profile->getData('pickup_profile_id')) { Loading