You are here

public function AddressBook::allowsMultiple in Commerce Core 8.2

Gets whether a customer can have multiple profiles of this type.

Parameters

string $profile_type_id: The profile type ID.

Return value

bool TRUE if a customer can have multiple profiles of this type, FALSE otherwise.

Overrides AddressBookInterface::allowsMultiple

1 call to AddressBook::allowsMultiple()
AddressBook::copy in modules/order/src/AddressBook.php
Copies the profile to the customer's address book.

File

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

Class

AddressBook

Namespace

Drupal\commerce_order

Code

public function allowsMultiple($profile_type_id) {
  $bundle_info = $this->entityTypeBundleInfo
    ->getBundleInfo('profile');
  return !empty($bundle_info[$profile_type_id]['multiple']);
}