| 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 |
|