You are here

function commerce_license_form_alter in Commerce License 8.2

Implements hook_form_alter().

File

./commerce_license.module, line 82
Contains commerce_license.module.

Code

function commerce_license_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  $form_object = $form_state
    ->getFormObject();
  if ($form_object instanceof EntityFormInterface) {
    $form_alter = new GrantedEntityFormAlter($form_state
      ->getFormObject()
      ->getEntity());
    $form_alter
      ->formAlter($form, $form_state, $form_id);
  }
}