forked from FriendsOfREDAXO/Modulsammlung
-
Notifications
You must be signed in to change notification settings - Fork 0
/
boot.php
23 lines (16 loc) · 773 Bytes
/
boot.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
$this->setProperty('author', 'Friends Of REDAXO');
if (rex::isBackend() && rex::getUser()) {
rex_perm::register('modulsammlung[]');
rex_extension::register('PACKAGES_INCLUDED', function () {
if (rex::getUser() && $this->getProperty('compile')) {
$compiler = new rex_scss_compiler();
$scss_files = rex_extension::registerPoint(new rex_extension_point('BE_STYLE_SCSS_FILES', [$this->getPath('scss/master.scss')]));
$compiler->setScssFile($scss_files);
$compiler->setCssFile($this->getPath('assets/css/styles.css'));
$compiler->compile();
rex_file::copy($this->getPath('assets/css/styles.css'), $this->getAssetsPath('css/styles.css'));
}
});
rex_view::addCssFile($this->getAssetsUrl('css/styles.css'));
}