lory-8.x-1.x-dev/lory.install

lory.install
<?php

/**
 * @file
 * Installation actions for Lory.
 */

/**
 * Implements hook_requirements().
 */
function lory_requirements($phase) {
  if ($phase != 'runtime') {
    return [];
  }

  $path = lory_libraries_get_path('lory') ?: \Drupal::root() . '/libraries/lory';
  $exists = is_file($path . '/dist/lory.min.js');

  return [
    'lory_library' => [
      'title'       => t('Lory library'),
      'description' => $exists ? '' : t('The <a href=":url">Lory library</a> should be installed at <strong>/libraries/lory/dist/lory.min.js</strong>, or any path supported by libraries.module if installed. Check out file or folder permissions if troubled.', [':url' => 'https://github.com/meandmax/lory']),
      'severity'    => $exists ? REQUIREMENT_OK : REQUIREMENT_ERROR,
      'value'       => $exists ? t('Installed') : t('Not installed'),
    ],
  ];
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc