You are here

function commerce_order_entity_type_build in Commerce Core 8.2

Implements hook_entity_type_build().

Adds the address book form classes to profile entities. Referenced in commerce_order.routing.yml.

File

modules/order/commerce_order.module, line 220
Defines the Order entity and associated features.

Code

function commerce_order_entity_type_build(array &$entity_types) {

  /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */
  $entity_types['profile']
    ->setFormClass('address-book-add', 'Drupal\\commerce_order\\Form\\ProfileAddressBookForm');
  $entity_types['profile']
    ->setFormClass('address-book-edit', 'Drupal\\commerce_order\\Form\\ProfileAddressBookForm');
  $entity_types['profile']
    ->setFormClass('address-book-delete', 'Drupal\\commerce_order\\Form\\ProfileAddressBookDeleteForm');
}