You are here

function mailgun_form_libraries_admin_library_status_form_alter in Mailgun 7

Implements hook_form_FORM_ID_alter().

File

./mailgun.module, line 161
Provides integration with Mailgun's email sending API.

Code

function mailgun_form_libraries_admin_library_status_form_alter(&$form, &$form_state, $form_id) {
  $library = drupal_array_get_nested_value($form_state, array(
    'build_info',
    'args',
    0,
  ));
  if (empty($library['machine name']) || $library['machine name'] !== 'mailgun') {
    return;
  }

  // Libraries module provides own instruction "How to install the library".
  // We override it because this instruction is not correct and may confuse.
  $form['instructions'] = array(
    '#markup' => t('The Mailgun PHP library is not installed. Please see Installation section in the !link.', array(
      '!link' => l(t('documentation'), MAILGUN_DOCUMENTATION_LINK),
    )),
  );
}