Mercurial > hg > isophonics-drupal-site
comparison modules/contrib/views_slideshow/views_slideshow.module @ 5:c69a71b4f40f
Add slideshow module
author | Chris Cannam |
---|---|
date | Thu, 07 Dec 2017 14:46:23 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4:8948ab6c87d2 | 5:c69a71b4f40f |
---|---|
1 <?php | |
2 | |
3 /** | |
4 * @file | |
5 * Provides Slideshow style options for Views. | |
6 */ | |
7 | |
8 use Drupal\Core\Routing\RouteMatchInterface; | |
9 | |
10 /** | |
11 * Implements hook_help(). | |
12 */ | |
13 function views_slideshow_help($route_name, RouteMatchInterface $route_match) { | |
14 switch ($route_name) { | |
15 // Main module help for the gss module. | |
16 case 'help.page.views_slideshow': | |
17 $output = '<h3>' . t('About') . '</h3>'; | |
18 $output .= '<p>' . t('Views Slideshow can be used to create a slideshow of any content (not just images) that can appear in a View. Powered by jQuery, it is heavily customizable: you may choose slideshow settings for each View you create.') . '</p>'; | |
19 $output .= '<h3>' . t('More Information') . '</h3>'; | |
20 $output .= '<p>' . t('For more information about this module visite the <a href="@link">Views Slideshow</a> module page.', array('@link' => 'https://www.drupal.org/project/views_slideshow')) . '</p>'; | |
21 return $output; | |
22 } | |
23 } | |
24 | |
25 /** | |
26 * Implements hook_theme(). | |
27 */ | |
28 function views_slideshow_theme() { | |
29 return [ | |
30 'views_slideshow_main_section' => [ | |
31 'variables' => [ | |
32 'vss_id' => NULL, | |
33 'slides' => NULL, | |
34 'plugin' => NULL, | |
35 ], | |
36 'file' => 'views_slideshow.theme.inc', | |
37 ], | |
38 'views_slideshow_pager_widget_render' => [ | |
39 'variables' => [ | |
40 'vss_id' => NULL, | |
41 'view' => NULL, | |
42 'settings' => [], | |
43 'location' => NULL, | |
44 'rows' => [], | |
45 ], | |
46 'file' => 'views_slideshow.theme.inc', | |
47 'function' => 'template_preprocess_views_slideshow_pager_widget_render', | |
48 ], | |
49 'views_slideshow_pager_fields' => [ | |
50 'variables' => [ | |
51 'vss_id' => NULL, | |
52 'view' => NULL, | |
53 'settings' => [], | |
54 'location' => NULL, | |
55 'attributes' => [], | |
56 ], | |
57 'file' => 'views_slideshow.theme.inc', | |
58 ], | |
59 'views_slideshow_pager_field_field' => [ | |
60 'variables' => [ | |
61 'view' => NULL, | |
62 'css_identifier' => NULL, | |
63 'label' => NULL, | |
64 'output' => NULL, | |
65 ], | |
66 'file' => 'views_slideshow.theme.inc', | |
67 ], | |
68 'views_slideshow_pager_field_item' => [ | |
69 'variables' => [ | |
70 'vss_id' => NULL, | |
71 'item' => NULL, | |
72 'count' => NULL, | |
73 'location' => NULL, | |
74 'length' => NULL, | |
75 ], | |
76 ], | |
77 'views_slideshow_pager_bullets' => [ | |
78 'variables' => [ | |
79 'vss_id' => NULL, | |
80 'view' => NULL, | |
81 'settings' => [], | |
82 'location' => NULL, | |
83 'attributes' => [], | |
84 ], | |
85 'file' => 'views_slideshow.theme.inc', | |
86 ], | |
87 'views_slideshow_controls_widget_render' => [ | |
88 'variables' => [ | |
89 'vss_id' => NULL, | |
90 'view' => NULL, | |
91 'settings' => [], | |
92 'location' => NULL, | |
93 'rows' => [], | |
94 ], | |
95 'file' => 'views_slideshow.theme.inc', | |
96 'function' => 'template_preprocess_views_slideshow_controls_widget_render', | |
97 ], | |
98 'views_slideshow_controls_text' => [ | |
99 'variables' => [ | |
100 'vss_id' => NULL, | |
101 'view' => NULL, | |
102 'settings' => [], | |
103 'location' => NULL, | |
104 'rows' => [], | |
105 ], | |
106 'file' => 'views_slideshow.theme.inc', | |
107 ], | |
108 'views_slideshow_controls_text_previous' => [ | |
109 'variables' => [ | |
110 'vss_id' => NULL, | |
111 'view' => NULL, | |
112 'settings' => [], | |
113 ], | |
114 'file' => 'views_slideshow.theme.inc', | |
115 ], | |
116 'views_slideshow_controls_text_pause' => [ | |
117 'variables' => [ | |
118 'vss_id' => NULL, | |
119 'view' => NULL, | |
120 'settings' => [], | |
121 ], | |
122 'file' => 'views_slideshow.theme.inc', | |
123 ], | |
124 'views_slideshow_controls_text_next' => [ | |
125 'variables' => [ | |
126 'vss_id' => NULL, | |
127 'view' => NULL, | |
128 'settings' => [], | |
129 ], | |
130 'file' => 'views_slideshow.theme.inc', | |
131 ], | |
132 'views_slideshow_slide_counter_widget_render' => [ | |
133 'variables' => [ | |
134 'vss_id' => NULL, | |
135 'view' => NULL, | |
136 'settings' => [], | |
137 'location' => NULL, | |
138 'rows' => [], | |
139 ], | |
140 'file' => 'views_slideshow.theme.inc', | |
141 'function' => 'template_preprocess_views_slideshow_slide_counter_widget_render', | |
142 ], | |
143 'views_slideshow_slide_counter' => [ | |
144 'variables' => [ | |
145 'vss_id' => NULL, | |
146 'view' => NULL, | |
147 'settings' => [], | |
148 'location' => NULL, | |
149 'rows' => [], | |
150 ], | |
151 'file' => 'views_slideshow.theme.inc', | |
152 ], | |
153 ]; | |
154 } | |
155 | |
156 /** | |
157 * Views Slideshow: Slideshow. | |
158 * | |
159 * As it is a preprocess function, store it with other functions in theme.inc. | |
160 */ | |
161 function template_preprocess_views_view_slideshow(&$vars) { | |
162 \Drupal::moduleHandler()->loadInclude('views_slideshow', 'inc', 'views_slideshow.theme'); | |
163 _views_slideshow_preprocess_views_view_slideshow($vars); | |
164 } |