Columns.php
1.12 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
<?php
namespace AC\Admin\PageFactory;
use AC;
use AC\Admin;
use AC\Admin\MenuFactoryInterface;
use AC\Admin\Page;
use AC\Admin\PageFactoryInterface;
use AC\Admin\Preference;
use AC\Admin\Section;
use AC\Asset\Location;
use AC\DefaultColumnsRepository;
use AC\ListScreenRepository\Storage;
class Columns implements PageFactoryInterface {
/**
* @var Storage
*/
protected $storage;
/**
* @var Location\Absolute
*/
protected $location;
/**
* @var MenuFactoryInterface
*/
protected $menu_factory;
/**
* @var bool
*/
private $is_acp_active;
public function __construct(
Storage $storage,
Location\Absolute $location,
MenuFactoryInterface $menu_factory,
bool $is_acp_active
) {
$this->storage = $storage;
$this->location = $location;
$this->menu_factory = $menu_factory;
$this->is_acp_active = $is_acp_active;
}
public function create() {
return new Page\Columns(
$this->location,
new DefaultColumnsRepository(),
new Section\Partial\Menu(),
$this->storage,
new Admin\View\Menu( $this->menu_factory->create( 'columns' ) ),
new Preference\ListScreen(),
$this->is_acp_active
);
}
}