Commit fa65edc7 authored by borisson_'s avatar borisson_ Committed by StryKaizer

Issue #2942558 by borisson_, StryKaizer: Facets Range Widget needs library jQuery-ui-Slider-Pips

parent 4fabe1d3
<?php
/**
* @file
* Contains install hooks for facets range widget.
*/
/**
* Implements hook_requirements().
*/
function facets_range_widget_requirements() {
$library_name = 'jquery-ui-slider-pips';
$library_path = '/libraries/' . $library_name;
$library_exists = (file_exists(DRUPAL_ROOT . $library_path)) ? TRUE : FALSE;
$requirements = [];
if (!$library_exists) {
$arguments = [
':docs' => 'https://www.drupal.org/docs/8/theming-drupal-8/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-theme#external',
':readme' => 'http://cgit.drupalcode.org/facets/tree/modules/facets_range_widget/README.txt',
];
$requirements['facets_range_widget_pips_slider'] = [
'title' => t('Facets range slider'),
'value' => t('The jquery ui slider pips library is not installed.'),
'severity' => REQUIREMENT_ERROR,
'description' => t('The range slider library is not installed, check the <a href=":readme">README.txt for more information</a> and <a href=":docs">the documentation for information on how to install a library</a>.', $arguments),
];
}
return $requirements;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment