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

TemplateCombo   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

1 Method

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