TemplateCombo   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 26
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPluginOptions() 0 8 1
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