Tools.php
987 Bytes
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
<?php
namespace ACP\Admin\PageFactory;
use AC;
use AC\Admin\MenuFactoryInterface;
use AC\Admin\PageFactoryInterface;
use AC\Asset\Location;
use AC\ListScreenRepository\Storage;
use ACP\Admin\Page;
use ACP\Migrate\Admin\Section\Export;
use ACP\Migrate\Admin\Section\Import;
class Tools implements PageFactoryInterface {
/**
* @var Location\Absolute
*/
private $location;
/**
* @var Storage
*/
private $storage;
/**
* @var MenuFactoryInterface
*/
private $menu_factory;
public function __construct( Location\Absolute $location, Storage $storage, MenuFactoryInterface $menu_factory ) {
$this->location = $location;
$this->storage = $storage;
$this->menu_factory = $menu_factory;
}
public function create() {
$page = new Page\Tools(
$this->location,
new AC\Admin\View\Menu( $this->menu_factory->create( 'import-export' ) )
);
$page->add_section( new Export( $this->storage, false ) )
->add_section( new Import() );
return $page;
}
}