You are here

function twig_xdebug_requirements in Twig Xdebug 8

Implements hook_requirements().

File

./twig_xdebug.install, line 11
Twig Xdebug install and update hooks.

Code

function twig_xdebug_requirements($phase) {
  $requirements = [];
  if ($phase == 'install') {
    if (!class_exists('\\Ajgl\\Twig\\Extension\\BreakpointExtension')) {
      $requirements['breakpoints_library'] = [
        'description' => t('Twig Xdebug requires the ajgl/breakpoint-twig-extension library.'),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}