interface ProfileFieldCopyInterface in Commerce Shipping 8.2
Copies shared field values from the shipping profile to the billing profile.
Hierarchy
- interface \Drupal\commerce_shipping\ProfileFieldCopyInterface
Expanded class hierarchy of ProfileFieldCopyInterface
All classes that implement ProfileFieldCopyInterface
File
- src/
ProfileFieldCopyInterface.php, line 10
Namespace
Drupal\commerce_shippingView source
interface ProfileFieldCopyInterface {
/**
* Gets whether the given inline form is supported.
*
* Confirms that:
* - The inline form is used for billing information.
* - The inline form is embedded on a shippable order's page.
*
* @param array $inline_form
* The inline form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @return bool
* TRUE if the element can be attached, FALSE otherwise.
*/
public function supportsForm(array &$inline_form, FormStateInterface $form_state);
/**
* Alters the inline form.
*
* Adds the field copy checkbox ("Billing same as shipping').
* Ensures that field values are copied on submit.
*
* @param array $inline_form
* The inline form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*/
public function alterForm(array &$inline_form, FormStateInterface $form_state);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ProfileFieldCopyInterface:: |
public | function | Alters the inline form. | 1 |
ProfileFieldCopyInterface:: |
public | function | Gets whether the given inline form is supported. | 1 |