-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfriday_api.module
More file actions
37 lines (30 loc) · 822 Bytes
/
friday_api.module
File metadata and controls
37 lines (30 loc) · 822 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
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Form\FormStateInterface;
function friday_api_page_attachments(array &$attachments) {
$attachments['#attached']['library'][] = 'friday_api/friday_api_js';
}
/**
* Implements hook_theme() to add the template definition.
**/
function friday_api_theme($existing, $type, $theme, $path) {
return [
'friday_api' => [
'variables' => ['blogs' => NULL],
],
'single_blog' => [
'variables' => ['blogs' => NULL],
],
'filter_api' => [
'variables' => ['blogs' => NULL],
],
'api-form-block' => [
'variables' => [
'blogs' => NULL,
'form' => NULL
],
],
];
}
?>