Failed Conditions
Pull Request — experimental/sf (#3236)
by Kentaro
132:46 queued 125:39
created

AdminProductListCustomizer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Acme\Doctrine\Query;
15
16
use Eccube\Doctrine\Query\OrderByClause;
17
use Eccube\Doctrine\Query\OrderByCustomizer;
18
use Eccube\Repository\QueryKey;
19
20
class AdminProductListCustomizer extends OrderByCustomizer
21
{
22
    /**
23
     * 常に商品IDでソートする。
24
     *
25
     * @param array $params
26
     * @param $queryKey
27
     *
28
     * @return OrderByClause[]
29
     */
30
    protected function createStatements($params, $queryKey)
31
    {
32
        return [];
33
        // このサンプルを動作させるには、以下を有効にしてください.
34
        // return [new OrderByClause('p.id')];
35
    }
36
37
    /**
38
     * カスタマイズ対象のキーを返します。
39
     *
40
     * @return string
41
     */
42
    public function getQueryKey()
43
    {
44
        return QueryKey::PRODUCT_SEARCH_ADMIN;
45
    }
46
}
47