You are here

function dfp_requirements in Doubleclick for Publishers (DFP) 7.2

Same name and namespace in other branches
  1. 7 dfp.install \dfp_requirements()

Implements hook_requirements().

File

./dfp.install, line 98
Installation file for DFP module.

Code

function dfp_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    if (variable_get('dfp_token_cache_enabled', 0)) {
      if (!function_exists('entity_modified_last')) {
        $requirements['dfp_token_cache'] = array(
          'title' => t('DFP dependency'),
          'value' => t('DFP token cache requires Entity Modified module.'),
          'description' => t('Please install <a href="@module">Entity Modified</a> module or disable the option.', array(
            '@module' => 'https://www.drupal.org/project/entity_modified',
          )),
          'severity' => REQUIREMENT_ERROR,
        );
      }
    }
  }
  return $requirements;
}