Completed
Push — master ( 63ab7f...7e002b )
by Dmitry
03:41
created

TemplateCombo::getPluginOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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