/
LegacyCustomizerType.php
60 lines (49 loc) · 1.95 KB
/
LegacyCustomizerType.php
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
namespace Concrete\Core\StyleCustomizer\Customizer\Type;
use Concrete\Core\StyleCustomizer\Customizations\LegacyCustomizationsManager;
use Concrete\Core\StyleCustomizer\Customizations\ManagerInterface as CustomizationsManagerInterface;
use Concrete\Core\StyleCustomizer\Normalizer\LegacyNormalizer;
use Concrete\Core\StyleCustomizer\Normalizer\NormalizerInterface;
use Concrete\Core\StyleCustomizer\Preset\Type\LessFilePresetType;
use Concrete\Core\StyleCustomizer\Preset\Type\TypeInterface as PresetTypeInterface;
use Concrete\Core\StyleCustomizer\Preview\LegacyStylesheetPreviewHandler;
use Concrete\Core\StyleCustomizer\Preview\PreviewHandlerInterface;
use Concrete\Core\StyleCustomizer\Processor\LessProcessor;
use Concrete\Core\StyleCustomizer\Processor\ProcessorInterface;
use Concrete\Core\StyleCustomizer\Style\Parser\Manager\ManagerInterface;
use Concrete\Core\StyleCustomizer\Style\Parser\Manager\Version1Manager;
class LegacyCustomizerType extends AbstractCustomizerType
{
public function getPresetType(): PresetTypeInterface
{
return $this->app->make(LessFilePresetType::class);
}
public function getVariableNormalizer(): NormalizerInterface
{
return $this->app->make(LegacyNormalizer::class);
}
public function getStyleProcessor(): ProcessorInterface
{
return $this->app->make(LessProcessor::class);
}
public function getParserManager(): ManagerInterface
{
return $this->app->make(Version1Manager::class);
}
public function supportsCustomSkins(): bool
{
return false;
}
public function supportsPageCustomization(): bool
{
return true;
}
public function getPreviewHandler(): PreviewHandlerInterface
{
return $this->app->make(LegacyStylesheetPreviewHandler::class);
}
public function getCustomizationsManager(): CustomizationsManagerInterface
{
return $this->app->make(LegacyCustomizationsManager::class);
}
}