Completed
Push — master ( a20c7b...d885ca )
by Nate
02:36
created

ElementListTrait::getSearchKeywords()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 2
crap 6
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://github.com/flipboxfactory/craft-element-lists/LICENSE
6
 * @link       https://github.com/flipboxfactory/craft-element-lists/
7
 */
8
9
namespace flipbox\craft\element\lists\fields;
10
11
use craft\base\ElementInterface;
12
13
/**
14
 * @author Flipbox Factory <[email protected]>
15
 * @since 2.0.0
16
 */
17
trait ElementListTrait
18
{
19
    use ModifyElementQueryTrait,
20
        NormalizeValueTrait,
21
        InputTrait;
22
23
    /**
24
     * @var bool
25
     */
26
    protected $ignoreSearchKeywords = true;
27
28
    /**
29
     * @inheritdoc
30
     */
31
    public function getSearchKeywords($value, ElementInterface $element): string
32
    {
33
        if ($this->ignoreSearchKeywords === true) {
34
            return '';
35
        }
36
37
        return parent::getSearchKeywords($value, $element);
38
    }
39
}
40