PluginProbe
The GDPR Framework By Data443 / trunk
The GDPR Framework By Data443 vtrunk
2.5.0 2.4.0 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.3 1.0.33 1.0.34 1.0.35 1.0.36 1.0.37 1.0.39 1.0.4 1.0.40 1.0.41 1.0.42 1.0.43 1.0.44 1.0.45 1.0.46 All 41 releases
gdpr-framework / src / SetupAdmin.php

SetupAdmin.php in The GDPR Framework By Data443 trunk, at src/SetupAdmin.php

68 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Codelight\GDPR;
4
5 use Codelight\GDPR\Admin\AdminError;
6 use Codelight\GDPR\Admin\AdminNotice;
7 use Codelight\GDPR\Admin\Modal;
8 use Codelight\GDPR\Admin\WordpressAdmin;
9 use Codelight\GDPR\Admin\WordpressAdminPage;
10 use Codelight\GDPR\Components\Consent\ConsentAdmin;
11 use Codelight\GDPR\Components\CookiePopup\CookiePopup;
12 use Codelight\GDPR\Installer\Installer;
13 use Codelight\GDPR\Installer\AdminInstallerNotice;
14 use Codelight\GDPR\Admin\AdminPrivacySafe;
15 use Codelight\GDPR\DataSubject\DataSubjectAdmin;
16 use Codelight\GDPR\Components\PrivacyPolicy\PrivacyPolicy;
17 use Codelight\GDPR\Components\DoNotSell\DoNotSell;
18 use Codelight\GDPR\Components\Support\Support;
19 use Codelight\GDPR\Components\AdvancedIntegration\AdvancedIntegration;
20 use Codelight\GDPR\Components\PrivacySafe\PrivacySafe;
21
22 /**
23 * Register and set up admin components.
24 * This class is instantiated at admin_init priority 0
25 *
26 * Class SetupAdmin
27 *
28 * @package Codelight\GDPR
29 */
30 class SetupAdmin
31 {
32 public function __construct()
33 {
34 $this->registerComponents();
35 $this->runComponents();
36 }
37
38 /**
39 * Register components in the container
40 */
41 protected function registerComponents()
42 {
43 global $gdpr;
44 $gdpr->AdminNotice = new AdminNotice();
45 $gdpr->AdminError = new AdminError();
46 $gdpr->AdminInstallerNotice = new AdminInstallerNotice();
47 $gdpr->PrivacySafe = new AdminPrivacySafe();
48 $gdpr->AdminModal = new Modal();
49 $gdpr->AdminPage = new WordpressAdminPage();
50 $gdpr->AdminTabGeneral = new Admin\AdminTabGeneral();
51 }
52
53 protected function runComponents()
54 {
55 global $gdpr;
56 new WordpressAdmin($gdpr->AdminPage);
57 new Installer($gdpr->AdminTabGeneral);
58 new CookiePopup();
59 new ConsentAdmin();
60 new DataSubjectAdmin();
61 new PrivacyPolicy();
62 new DoNotSell();
63 new Support();
64 new AdvancedIntegration();
65 new PrivacySafe();
66 }
67 }
68