-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathboot.php
More file actions
21 lines (17 loc) · 775 Bytes
/
boot.php
File metadata and controls
21 lines (17 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
use FriendsOfRedaxo\BlockPeek\TemplateListHider;
/** @var rex_addon_interface $addon */
$addon = $this;
if ($addon->getConfig('inactive') !== '|1|') {
if (rex::isBackend() && rex::getUser()) {
rex_view::addJsFile($this->getAssetsUrl('BlockPeek.js'));
rex_view::addCssFile($this->getAssetsUrl('BlockPeek.css'));
rex_extension::register('PACKAGES_INCLUDED', function () {
rex_extension::register('SLICE_BE_PREVIEW', \FriendsOfRedaxo\BlockPeek\Extension::register(...), rex_extension::LATE);
});
}
}
// Hide the internal block_peek template row from the backend templates list page.
if (rex::isBackend()) {
rex_extension::register('OUTPUT_FILTER', [TemplateListHider::class, 'register'], rex_extension::LATE);
}