forked from mapasculturais/plugin-Accessibility
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Plugin.php
40 lines (30 loc) · 937 Bytes
/
Plugin.php
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
38
39
40
<?php
namespace Accessibility;
use MapasCulturais\App;
use MapasCulturais\i;
class Plugin extends \MapasCulturais\Plugin
{
function __construct(array $config = [])
{
parent::__construct($config);
}
public function _init()
{
$app = App::i();
// enqueue scripts and styles
$app->view->enqueueScript('app', 'accessibility', 'js/accessibility.js');
$app->view->enqueueStyle('app', 'accessibility', 'css/accessibility.css');
// add hooks
$app->hook('template(<<*>>.<<*>>.nav.main.events):before', function () use ($app) {
$app->view->part('accessibility/controls.php');
});
$app->hook('template(<<*>>.<<*>>.main-footer):end', function () use ($app) {
$this->part('accessibility/vlibras');
});
}
public function register()
{
$app = App::i();
}
}
?>