-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModule.php
More file actions
60 lines (52 loc) · 1.5 KB
/
Module.php
File metadata and controls
60 lines (52 loc) · 1.5 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
<?php
/**
* This file is part of the Bono CMS
*
* Copyright (c) No Global State Lab
*
* For the full copyright and license information, please view
* the license file that was distributed with this source code.
*/
namespace Pages;
use Cms\AbstractCmsModule;
use Pages\Service\PageManager;
use Krystal\Image\Tool\ImageManager;
final class Module extends AbstractCmsModule
{
/**
* Returns album image manager
*
* @return \Krystal\Image\Tool\ImageManager
*/
private function createImageManager()
{
$plugins = array(
'thumb' => array(
'dimensions' => array(
// Administration area
array(350, 350)
)
),
'original' => array(
'prefix' => 'original'
)
);
return new ImageManager(
'/data/uploads/module/pages',
$this->appConfig->getRootDir(),
$this->appConfig->getRootUrl(),
$plugins
);
}
/**
* {@inheritDoc}
*/
public function getServiceProviders()
{
$pageMapper = $this->getMapper('/Pages/Storage/MySQL/PageMapper');
return array(
'pageManager' => new PageManager($pageMapper, $this->getWebPageManager(), $this->createImageManager()),
'blockFieldService' => $this->createFieldService('\Pages\Storage\MySQL\PageExtraFieldMapper')
);
}
}