License.php
1.89 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
declare( strict_types=1 );
namespace ACP\Admin\PageFactory;
use AC;
use AC\Admin\MenuFactoryInterface;
use AC\Admin\PageFactoryInterface;
use AC\Asset\Location;
use ACP\Access\ActivationStorage;
use ACP\Access\PermissionsStorage;
use ACP\ActivationTokenFactory;
use ACP\Admin\Page;
use ACP\LicenseKeyRepository;
use ACP\Type\SiteUrl;
class License implements PageFactoryInterface {
/**
* @var Location\Absolute
*/
private $location;
/**
* @var MenuFactoryInterface
*/
private $menu_factory;
/**
* @var SiteUrl
*/
private $site_url;
/**
* @var ActivationTokenFactory
*/
private $activation_token_factory;
/**
* @var ActivationStorage
*/
private $activation_storage;
/**
* @var PermissionsStorage
*/
private $permission_storage;
/**
* @var LicenseKeyRepository
*/
private $license_key_repository;
/**
* @var bool
*/
private $network_active;
public function __construct(
Location\Absolute $location,
MenuFactoryInterface $menu_factory,
SiteUrl $site_url,
ActivationTokenFactory $activation_token_factory,
ActivationStorage $activation_storage,
PermissionsStorage $permission_storage,
LicenseKeyRepository $license_key_repository,
bool $network_active
) {
$this->location = $location;
$this->menu_factory = $menu_factory;
$this->site_url = $site_url;
$this->activation_token_factory = $activation_token_factory;
$this->activation_storage = $activation_storage;
$this->permission_storage = $permission_storage;
$this->license_key_repository = $license_key_repository;
$this->network_active = $network_active;
}
public function create() {
return new Page\License(
$this->location,
new AC\Admin\View\Menu( $this->menu_factory->create( 'license' ) ),
$this->site_url,
$this->activation_token_factory,
$this->activation_storage,
$this->permission_storage,
$this->license_key_repository,
$this->network_active
);
}
}