You are here

function svg_image_field_requirements in SVG Image Field 2.0.x

Same name and namespace in other branches
  1. 2.1.x svg_image_field.install \svg_image_field_requirements()

Implements hook_requirements().

File

./svg_image_field.install, line 12

Code

function svg_image_field_requirements($phase) {
  $requirements = [];
  if (!class_exists('\\enshrined\\svgSanitize\\Sanitizer')) {
    $requirements['svg_image_field_dependencies'] = [
      'title' => t('SVG image field'),
      'description' => \t('SVG Image Field has unmet Composer dependencies. Read the <a href="@url">documentation</a> on how to install them.', [
        '@url' => 'https://www.drupal.org/node/2627292',
      ]),
      'severity' => \REQUIREMENT_ERROR,
    ];
  }
  return $requirements;
}