Passed
Pull Request — master (#365)
by Dmitry
21:01
created

ContentProductSetTwigFunctionProvider::getFunction()   A

Complexity

Conditions 5
Paths 1

Size

Total Lines 28
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 28
c 0
b 0
f 0
rs 9.3888
cc 5
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace Pyz\Yves\ContentProductSetWidget\Twig;
9
10
use SprykerShop\Yves\ContentProductSetWidget\Twig\ContentProductSetTwigFunctionProvider as SprykerShopContentProductSetTwigFunctionProvider;
11
12
/**
13
 * @method \SprykerShop\Yves\ContentProductWidget\ContentProductWidgetFactory getFactory()
14
 */
15
class ContentProductSetTwigFunctionProvider extends SprykerShopContentProductSetTwigFunctionProvider
16
{
17
    /**
18
     * @var string
19
     */
20
    protected const WIDGET_TEMPLATE_IDENTIFIER_ADD_TO_CART = 'add-to-cart';
21
22
    /**
23
     * @return array<string>
24
     */
25
    protected function getAvailableTemplates(): array
26
    {
27
        $contentWidgetTemplates = parent::getAvailableTemplates();
28
29
        return [
30
            static::WIDGET_TEMPLATE_IDENTIFIER_ADD_TO_CART => '@ContentProductSetWidget/views/add-to-cart/add-to-cart.twig',
31
        ] + $contentWidgetTemplates;
32
    }
33
}
34