bootstrap_carousel_if.install in Bootstrap Carousel Image Formatter 8.3
Install, update and uninstall functions for the Bootstrap carousel if.
File
bootstrap_carousel_if.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Bootstrap carousel if.
*/
use Drupal\Core\Url;
/**
* Implements hook_requirements().
*/
function bootstrap_carousel_if_requirements($phase) {
$requirements = [];
if (!\Drupal::service('theme_handler')
->themeExists('bootstrap')) {
$url = Url::fromUri('https://www.drupal.org/project/bootstrap');
$requirements['bootstrap_carousel_if'] = [
'title' => t('Bootstrap theme missing'),
'description' => t('Bootstrap carousel formatter needs Bootstrap theme, please install and enable:
<a href=":url" target="_blank">https://www.drupal.org/project/bootstrap</a>', [
':url' => $url
->toUriString(),
]),
'severity' => REQUIREMENT_ERROR,
];
}
return $requirements;
}
Functions
Name![]() |
Description |
---|---|
bootstrap_carousel_if_requirements | Implements hook_requirements(). |