You are here

function url_embed_requirements in URL Embed 8

Implements hook_requirements().

Checks that the necessary libraries have been installed.

File

./url_embed.install, line 16
Contains install and update functions for URL Embed.

Code

function url_embed_requirements($phase) {
  $requirements = [];
  if ($phase === 'install') {
    if (!class_exists('\\Embed\\Embed')) {
      $requirements['url_embed_library'] = [
        'description' => t("URL Embed requires the Embed/Embed library."),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}