You are here

public function CustomerProfileAlter::applies in Drupal Commerce Connector for AvaTax 8

Gets whether the given customer profile inline form is supported.

Parameters

array $inline_form: The inline form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

bool TRUE if the customer profile inline form is supported, FALSE otherwise.

Overrides CustomerProfileAlterInterface::applies

File

src/CustomerProfileAlter.php, line 72

Class

CustomerProfileAlter
The customer profile alter for address validation.

Namespace

Drupal\commerce_avatax

Code

public function applies(array &$inline_form, FormStateInterface $form_state) {
  return $inline_form['#profile_scope'] === 'shipping' && (bool) $this->config
    ->get('address_validation.enable') === TRUE;
}