| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 52 | public function getPluginOptions($options = []) |
||
| 53 | { |
||
| 54 | return parent::getPluginOptions(ArrayHelper::merge([ |
||
| 55 | 'activeWhen' => $this->activeWhen, |
||
| 56 | 'select2Options' => [ |
||
| 57 | 'templateResult' => new JsExpression("function (data) { |
||
| 58 | if (data.loading) { |
||
| 59 | return data.text; |
||
| 60 | } |
||
| 61 | |||
| 62 | return data.text + ' - ' + data.server; |
||
| 63 | }"), |
||
| 64 | ], |
||
| 65 | ], $options)); |
||
| 66 | } |
||
| 67 | } |
||
| 68 |