1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/* |
6
|
|
|
* This file is part of the Superdesk Web Publisher Core Bundle. |
7
|
|
|
* |
8
|
|
|
* Copyright 2017 Sourcefabric z.ú. and contributors. |
9
|
|
|
* |
10
|
|
|
* For the full copyright and license information, please see the |
11
|
|
|
* AUTHORS and LICENSE files distributed with this source code. |
12
|
|
|
* |
13
|
|
|
* @copyright 2017 Sourcefabric z.ú |
14
|
|
|
* @license http://www.superdesk.org/license |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
namespace SWP\Bundle\CoreBundle\Theme\Processor; |
18
|
|
|
|
19
|
|
|
use SWP\Bundle\ContentBundle\Service\RouteServiceInterface; |
20
|
|
|
use SWP\Bundle\CoreBundle\Theme\Generator\GeneratorInterface; |
21
|
|
|
use SWP\Bundle\CoreBundle\Theme\Model\ThemeInterface; |
22
|
|
|
|
23
|
|
|
class RequiredDataProcessor implements RequiredDataProcessorInterface |
24
|
|
|
{ |
25
|
|
|
/** |
26
|
|
|
* @var RouteServiceInterface |
27
|
|
|
*/ |
28
|
|
|
protected $themeRoutesGenerator; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @var GeneratorInterface |
32
|
|
|
*/ |
33
|
|
|
protected $themeMenusGenerator; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @var GeneratorInterface |
37
|
|
|
*/ |
38
|
|
|
protected $themeContainersGenerator; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @var GeneratorInterface |
42
|
|
|
*/ |
43
|
|
|
protected $themeWidgetsGenerator; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @var GeneratorInterface |
47
|
|
|
*/ |
48
|
|
|
protected $themeContentListsGenerator; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* RequiredDataProcessor constructor. |
52
|
|
|
* |
53
|
|
|
* @param GeneratorInterface $themeRoutesGenerator |
54
|
|
|
* @param GeneratorInterface $themeMenusGenerator |
55
|
|
|
* @param GeneratorInterface $themeContainersGenerator |
56
|
|
|
* @param GeneratorInterface $themeWidgetsGenerator |
57
|
|
|
* @param GeneratorInterface $themeContentListsGenerator |
58
|
|
|
*/ |
59
|
|
|
public function __construct(GeneratorInterface $themeRoutesGenerator, GeneratorInterface $themeMenusGenerator, GeneratorInterface $themeContainersGenerator, GeneratorInterface $themeWidgetsGenerator, GeneratorInterface $themeContentListsGenerator) |
60
|
|
|
{ |
61
|
|
|
$this->themeRoutesGenerator = $themeRoutesGenerator; |
|
|
|
|
62
|
|
|
$this->themeMenusGenerator = $themeMenusGenerator; |
63
|
|
|
$this->themeContainersGenerator = $themeContainersGenerator; |
64
|
|
|
$this->themeWidgetsGenerator = $themeWidgetsGenerator; |
65
|
|
|
$this->themeContentListsGenerator = $themeContentListsGenerator; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* {@inheritdoc} |
70
|
|
|
*/ |
71
|
|
|
public function processTheme(ThemeInterface $theme): void |
72
|
|
|
{ |
73
|
|
|
$this->themeRoutesGenerator->generate($theme->getRoutes()); |
|
|
|
|
74
|
|
|
$this->themeMenusGenerator->generate($theme->getMenus()); |
75
|
|
|
$this->themeContainersGenerator->generate($theme->getContainers()); |
76
|
|
|
$this->themeContentListsGenerator->generate($theme->getContentLists()); |
77
|
|
|
$this->themeWidgetsGenerator->generate($theme->getWidgets()); |
78
|
|
|
} |
79
|
|
|
} |
80
|
|
|
|
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..