-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathefq.module
More file actions
executable file
·37 lines (27 loc) · 834 Bytes
/
efq.module
File metadata and controls
executable file
·37 lines (27 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Change layout of page to have no wrappers when on EFQ call
*
*/
function efq_theme_suggestions_page_alter(array &$suggestions, array $variables) {
if(strpos(\Drupal::service('path.current')->getPath(), 'efq') !== false){
$suggestions[] = 'page__ajax';
}
}
/**
* Change layout of html to have no wrappers when on EFQ call
*
*/
function efq_theme_suggestions_html_alter(array &$suggestions, array $variables) {
if(strpos(\Drupal::service('path.current')->getPath(), 'efq') !== false){
$suggestions[] = 'html__ajax';
}
}
/** Implements hook_query_TAG_alter()
*
* @param \Drupal\Core\Database\Query\SelectInterface $query
*/
function efq_query_random_order_alter(Drupal\Core\Database\Query\AlterableInterface $query) {
// Select a random element.
$query->orderRandom();
}