4
4
* See COPYING.txt for license details.
5
5
*/
6
6
7
- // phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
8
7
?>
9
8
<?php
10
- /** @var $block \Magento\LayeredNavigation\Block\Navigation\FilterRenderer */
9
+ /** @var \Magento\LayeredNavigation\Block\Navigation\FilterRenderer $block */
10
+ /** @var \Magento\Framework\Escaper $escaper */
11
11
/** @var \Magento\LayeredNavigation\ViewModel\Layer\Filter $viewModel */
12
12
$ viewModel = $ block ->getData ('product_layer_view_model ' );
13
13
?>
@@ -16,28 +16,29 @@ $viewModel = $block->getData('product_layer_view_model');
16
16
<?php foreach ($ filterItems as $ filterItem ): ?>
17
17
<li class="item">
18
18
<?php if ($ filterItem ->getCount () > 0 ): ?>
19
- <a href="<?= $ block ->escapeUrl ($ filterItem ->getUrl ()) ?> " rel="nofollow">
20
- <?= /* @noEscape */ $ filterItem ->getLabel () ?>
21
- <?php if ($ viewModel ->shouldDisplayProductCountOnLayer ()): ?>
22
- <span class="count"><?= /* @noEscape */ (int )$ filterItem ->getCount () ?>
23
- <span class="filter-count-label">
24
- <?php if ($ filterItem ->getCount () == 1 ):
25
- ?> <?= $ block ->escapeHtml (__ ('item ' )) ?> <?php
19
+ <a
20
+ href="<?= $ escaper ->escapeUrl ($ filterItem ->getUrl ()) ?> "
21
+ rel="nofollow"
22
+ ><?= /* @noEscape */ $ filterItem ->getLabel () ?> <?php
23
+ if ($ viewModel ->shouldDisplayProductCountOnLayer ()): ?> <span
24
+ class="count"><?= /* @noEscape */ (int ) $ filterItem ->getCount () ?> <span
25
+ class="filter-count-label"><?php
26
+ if ($ filterItem ->getCount () == 1 ): ?>
27
+ <?= $ escaper ->escapeHtml (__ ('item ' )) ?> <?php
26
28
else :
27
- ?> <?= $ block ->escapeHtml (__ ('item ' )) ?> <?php
29
+ ?> <?= $ escaper ->escapeHtml (__ ('item ' )) ?> <?php
28
30
endif ;?> </span></span>
29
- <?php endif ; ?>
30
- </a>
31
+ <?php endif ; ?> </a>
31
32
<?php else : ?>
32
- <?= /* @noEscape */ $ filterItem ->getLabel () ?>
33
- <?php if ($ viewModel ->shouldDisplayProductCountOnLayer ()): ?>
34
- <span class="count"><?= /* @noEscape */ (int )$ filterItem ->getCount () ?>
35
- <span class="filter-count-label">
36
- <?php if ($ filterItem ->getCount () == 1 ):
37
- ?> <?= $ block ->escapeHtml (__ ('items ' )) ?> <?php
38
- else :
39
- ?> <?= $ block ->escapeHtml (__ ('items ' )) ?> <?php
40
- endif ;?> </span></span>
33
+ <?= /* @noEscape */ $ filterItem ->getLabel () ?> <?php
34
+ if ($ viewModel ->shouldDisplayProductCountOnLayer ()): ?> <span
35
+ class="count"><?= /* @noEscape */ (int ) $ filterItem ->getCount () ?> <span
36
+ class="filter-count-label"><?php
37
+ if ($ filterItem ->getCount () == 1 ): ?>
38
+ <?= $ escaper ->escapeHtml (__ ('items ' )) ?> <?php
39
+ else :
40
+ ?> <?= $ escaper ->escapeHtml (__ ('items ' )) ?> <?php
41
+ endif ;?> </span></span>
41
42
<?php endif ; ?>
42
43
<?php endif ; ?>
43
44
</li>
0 commit comments