Passed
Pull Request — master (#405)
by Anton
04:50
created

shouldPersistModifiedOrderItemProperties()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
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\Zed\Sales;
9
10
use Spryker\Zed\Sales\SalesConfig as SprykerSalesConfig;
11
12
class SalesConfig extends SprykerSalesConfig
13
{
14
    /**
15
     * This method provides list of urls to render blocks inside order detail page.
16
     * URL defines path to external bundle controller. For example: /discount/sales/list would call discount bundle, sales controller, list action.
17
     * Action should return return array or redirect response.
18
     *
19
     * example:
20
     * [
21
     *    'discount' => '/discount/sales/index',
22
     * ]
23
     *
24
     * @return array<string>
25
     */
26
    public function getSalesDetailExternalBlocksUrls(): array
27
    {
28
        $projectExternalBlocks = [
29
            'cart_note' => '/cart-note/sales/list', #CartNoteFeature
30
            'return' => '/sales-return-gui/sales/list',
31
            'comment' => '/comment-sales-connector/sales/list',
32
            'cart_note_bundle_items' => '/cart-note-product-bundle-connector/sales/list', #CartNoteFeature
33
            'payments' => '/payment/sales/list',
34
            'discount' => '/discount/sales/list',
35
            'refund' => '/refund/sales/list',
36
        ];
37
38
        $externalBlocks = parent::getSalesDetailExternalBlocksUrls();
39
40
        return array_merge($externalBlocks, $projectExternalBlocks);
41
    }
42
43
    /**
44
     * @api
45
     *
46
     * @return bool
47
     */
48
    public function isHydrateOrderHistoryToItems(): bool
49
    {
50
        return false;
51
    }
52
53
    /**
54
     * @return bool
55
     */
56
    public function isOldDeterminationForOrderItemProcessEnabled(): bool
57
    {
58
        return false;
59
    }
60
61
    /**
62
     * @return bool
63
     */
64
    public function shouldPersistModifiedOrderItemProperties(): bool
65
    {
66
        return true;
67
    }
68
}
69