5
5
*/
6
6
namespace Magento \Framework \View \Layout ;
7
7
8
- use Magento \Framework \View \Layout \Condition \AndConditionFactory ;
8
+ use Magento \Framework \View \Layout \Condition \ConditionFactory ;
9
9
10
10
/**
11
11
* Pool of generators for structural elements
@@ -28,24 +28,24 @@ class GeneratorPool
28
28
protected $ logger ;
29
29
30
30
/**
31
- * @var \Magento\Framework\View\Layout\Condition\AndConditionFactory
31
+ * @var \Magento\Framework\View\Layout\Condition\ConditionFactory
32
32
*/
33
- private $ andConditionFactory ;
33
+ private $ conditionFactory ;
34
34
35
35
/**
36
36
* @param ScheduledStructure\Helper $helper
37
- * @param AndConditionFactory $andConditionFactory
37
+ * @param ConditionFactory $conditionFactory
38
38
* @param \Psr\Log\LoggerInterface $logger
39
39
* @param array $generators
40
40
*/
41
41
public function __construct (
42
42
ScheduledStructure \Helper $ helper ,
43
- AndConditionFactory $ andConditionFactory ,
43
+ ConditionFactory $ conditionFactory ,
44
44
\Psr \Log \LoggerInterface $ logger ,
45
45
array $ generators = null
46
46
) {
47
47
$ this ->helper = $ helper ;
48
- $ this ->andConditionFactory = $ andConditionFactory ;
48
+ $ this ->conditionFactory = $ conditionFactory ;
49
49
$ this ->logger = $ logger ;
50
50
$ this ->addGenerators ($ generators );
51
51
}
@@ -123,8 +123,8 @@ protected function buildStructure(ScheduledStructure $scheduledStructure, Data\S
123
123
array_key_exists ('visibilityConditions ' , $ data ['attributes ' ]) &&
124
124
!empty ($ data ['attributes ' ]['visibilityConditions ' ])
125
125
) {
126
- $ andCondition = $ this ->andConditionFactory ->create ($ data ['attributes ' ]['visibilityConditions ' ]);
127
- if (!$ andCondition ->isVisible ($ data ['attributes ' ]['visibilityConditions ' ])) {
126
+ $ condition = $ this ->conditionFactory ->create ($ data ['attributes ' ]['visibilityConditions ' ]);
127
+ if (!$ condition ->isVisible ($ data ['attributes ' ]['visibilityConditions ' ])) {
128
128
$ this ->removeElement ($ scheduledStructure , $ structure , $ name );
129
129
}
130
130
}
0 commit comments