You are here

twig_extensions.install in Twig Extensions 8

Same filename and directory in other branches
  1. 8.2 twig_extensions.install

File

twig_extensions.install
View source
<?php

/**
 * Implements hook_requirements().
 */
function twig_extensions_requirements($phase) {
  $requirements = [];
  if (!class_exists('IntlDateFormatter')) {
    $requirements['twig_extensions_intl']['title'] = t('Twig Extensions Intl');
    $requirements['twig_extensions_intl']['description'] = t('Twig Extensions Intl is not active because the <a href=":intl_url">PHP Extension</a> is not installed. While not needed with Drupal having similar functionality, it may be desired.', [
      ':intl_url' => 'http://php.net/manual/en/book.intl.php',
    ]);
    $requirements['twig_extensions_intl']['severity'] = REQUIREMENT_INFO;
  }
  return $requirements;
}

Functions