-
Notifications
You must be signed in to change notification settings - Fork 2
/
Plugin.php
58 lines (44 loc) · 1.52 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?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();
$app->view->enqueueStyle('app-v2', 'accessibility-v2', 'css/plugin-Accessibility.css');
$app->view->enqueueStyle('app-v2', 'contrast-accessibility-v2', 'css/accessibility.css');
// add hooks
$app->hook('template(<<*>>.<<*>>.mc-header-menu):end', function () use ($app) {
$this->part('accessibility/controls');
});
$app->hook('template(<<*>>.<<*>>.head):end', function () use ($app) {
$this->part('accessibility/vlibras');
});
$app->hook('template(<<*>>.<<*>>.body):begin', function () use ($app) {
$this->part('accessibility/controls-itens');
});
$app->hook('component(mc-icon).iconset', function(&$iconset){
$iconset['access_accessibility'] = "carbon:accessibility-alt";
$iconset['access_adjust'] = "typcn:adjust-contrast";
$iconset['access_plus'] = "ei:plus";
$iconset['access_minus'] = "ei:minus";
$iconset['access_close'] = "ei:close-o";
});
}
/**
* Registra os controladores e metadados das entidades
*
* @return void
*/
public function register()
{
$app = App::i();
}
}
?>