generated from FriendsOfREDAXO/rex_repo_template
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathboot.php
More file actions
23 lines (18 loc) · 947 Bytes
/
boot.php
File metadata and controls
23 lines (18 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
use FriendsOfRedaxo\RelationSelect\RelationSelect;
if (rex::isBackend() && 'login' != rex_be_controller::getCurrentPage()) {
rex_view::addJsFile('https://cdn.jsdelivr.net/npm/sortablejs@1.15.0/Sortable.min.js');
rex_view::addJsFile(rex_url::addonAssets('relation_select', 'relation_select.js'));
rex_view::addCssFile(rex_url::addonAssets('relation_select', 'relation_select.css'));
rex_view::setJsProperty('relation_select', [
'search_placeholder' => rex_i18n::msg('relation_select_search_placeholder'),
'selected_items' => rex_i18n::msg('relation_select_selected_items'),
'error_loading' => rex_i18n::msg('relation_select_error_loading'),
]);
}
rex_api_function::register('relation_select', RelationSelect::class);
// YForm-Integration
$addon = rex_addon::get('relation_select');
if (rex_addon::get('yform')->isAvailable()) {
rex_yform::addTemplatePath($addon->getPath('ytemplates'));
}