Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / themes / contrib / bootstrap / icons.inc
1 <?php
2
3 /**
4  * @file
5  * Icon API support to provide Bootstrap Framework glyphicons.
6  */
7
8 use Drupal\bootstrap\Bootstrap;
9
10 /**
11  * Implements hook_icon_providers().
12  */
13 function bootstrap_icon_providers() {
14   $providers['bootstrap'] = [
15     'title' => t('Bootstrap'),
16     'url' => 'https://getbootstrap.com/docs/3.3/components/#glyphicons',
17   ];
18   return $providers;
19 }
20
21 /**
22  * Implements hook_icon_bundles().
23  */
24 function bootstrap_icon_bundles() {
25   $bundles = [];
26   if (Bootstrap::getTheme()->hasGlyphicons()) {
27     $bundles['bootstrap'] = [
28       'render' => 'sprite',
29       'provider' => 'bootstrap',
30       'title' => t('Bootstrap'),
31       'version' => t('Icons by Glyphicons'),
32       'variations' => [
33         'icon-white' => t('White'),
34       ],
35       'settings' => [
36         'tag' => 'span',
37       ],
38       'icons' => Bootstrap::glyphicons(),
39     ];
40   }
41   return $bundles;
42 }