-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathboot.php
63 lines (52 loc) · 2.05 KB
/
boot.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
59
60
61
62
63
<?php
/**
* This file is part of the REDAXO-AddOn "focuspoint".
*
* @author FriendsOfREDAXO @ GitHub <https://github.com/FriendsOfREDAXO/focuspoint>
* @version 4.2.0
* @copyright FriendsOfREDAXO <https://friendsofredaxo.github.io/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* ------------------------------------------------------------------------------------------------
*
* Teile der Verarbeitung sind - bis auf die Abfragen - ausgelagert, um die Code-Übersetzung
* nur durchzuführen, wenn es notwendig ist, jedoch nicht bei jedem Aufruf.
*/
namespace FriendsOfRedaxo\Focuspoint;
use rex;
use rex_addon;
use rex_effect_focuspoint_fit;
use rex_media_manager;
/** @var rex_addon $this */
if (rex::isBackend()) {
switch (rex_request('page', 'string')) {
case 'mediapool/media':
// provide support for media detail-page
FocuspointBoot::mediaDetailPage($this);
break;
case 'metainfo/articles':
case 'metainfo/categories':
case 'metainfo/clangs':
// delete focuspoint-datatype from html-select for articles/categories/clangs
FocuspointBoot::metainfoDefault();
break;
case 'metainfo/media':
// prevent deletion of meta-fields still in use by effects
// limit changing the default-focuspoint-metafield: fieldname, fieldtype, no delete
// don´t remove the default-Metafield
FocuspointBoot::metainfoMedia();
break;
case 'media_manager/types':
// prevent deletion and editing of mediamanager-type used by focuspoint
FocuspointBoot::media_managerTypes();
break;
case 'packages':
// prevent deactivation if in use by effects
// effective only in dialog-mode via AddOn-administration-page
FocuspointBoot::packages($this);
break;
}
}
rex_media_manager::addEffect(rex_effect_focuspoint_fit::class);