You are here

public function AddressBook::loadTypes in Commerce Core 8.2

Loads the profile types used by the address book.

Only customer profile types are included.

Return value

\Drupal\profile\Entity\ProfileTypeInterface[] The profile types, keyed by profile type ID.

Overrides AddressBookInterface::loadTypes

1 call to AddressBook::loadTypes()
AddressBook::hasUi in modules/order/src/AddressBook.php
Gets whether the address book has a UI exposed.

File

modules/order/src/AddressBook.php, line 80

Class

AddressBook

Namespace

Drupal\commerce_order

Code

public function loadTypes() {

  /** @var \Drupal\profile\Entity\ProfileTypeInterface[] $profile_types */
  $profile_types = $this->profileTypeStorage
    ->loadByProperties([
    'third_party_settings.commerce_order.customer_profile_type' => TRUE,
  ]);
  return $profile_types;
}