You are here

function salesforce_mapping_requirements in Salesforce Suite 8.3

Same name and namespace in other branches
  1. 7.3 modules/salesforce_mapping/salesforce_mapping.install \salesforce_mapping_requirements()

Implements hook_requirements().

File

modules/salesforce_mapping/salesforce_mapping.install, line 14
Install file.

Code

function salesforce_mapping_requirements($phase) {
  $requirements = [];
  if ($phase === 'runtime') {
    if (!\Drupal::service('module_handler')
      ->moduleExists('typed_data')) {
      $requirements['salesforce_mapping'] = [
        'title' => t('Salesforce Mapping'),
        'value' => t('Enable Typed Data module to map extended field properties (like link URL or address details)'),
        'severity' => REQUIREMENT_WARNING,
      ];
    }
  }
  return $requirements;
}