TemplateCombo::getPluginOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * HiPanel tickets module
4
 *
5
 * @link      https://github.com/hiqdev/hipanel-module-ticket
6
 * @package   hipanel-module-ticket
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\modules\ticket\widgets;
12
13
use hiqdev\combo\Combo;
14
use yii\web\JsExpression;
15
16
class TemplateCombo extends Combo
17
{
18
    /** {@inheritdoc} */
19
    public $name = 'template';
20
21
    /** {@inheritdoc} */
22
    public $type = 'ticket/template';
23
24
    /** {@inheritdoc} */
25
    public $url = '@ticket/template/search';
26
27
    /** {@inheritdoc} */
28
    public $_return = ['id'];
29
30
    /** {@inheritdoc} */
31
    public $_rename = ['text' => 'name'];
32
33
    public function getPluginOptions($options = [])
34
    {
35
        return parent::getPluginOptions([
36
            'select2Options' => [
37
                'minimumResultsForSearch' => new JsExpression('Infinity'),
38
            ],
39
        ]);
40
    }
41
}
42