Total Complexity | 3 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
11 | class ActiveField extends \yii\bootstrap\ActiveField |
||
12 | { |
||
13 | /** |
||
14 | * {@inheritdoc} |
||
15 | */ |
||
16 | public function init() |
||
17 | { |
||
18 | parent::init(); |
||
19 | |||
20 | $inputName = explode('_', $this->attribute); |
||
21 | if (count($inputName) > 1) { |
||
22 | $inputName[0] = $inputName[1]; |
||
23 | } |
||
24 | $this->inputOptions = array_merge( |
||
25 | [ |
||
26 | 'data-braintree-name' => Inflector::underscore($inputName[0]), |
||
27 | 'autocomplete' => 'off', |
||
28 | ], |
||
29 | $this->inputOptions |
||
30 | ); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | public function widget($class, $config = []) |
||
41 | } |
||
42 | } |
||
43 |