Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function run() |
||
31 | { |
||
32 | ApplyToAllAsset::register($this->view); |
||
33 | $commonFormName = reset($this->models)->formName(); |
||
34 | $formId = Inflector::camel2id($commonFormName); |
||
35 | $formName = strtolower($commonFormName); |
||
36 | $options = \yii\helpers\Json::htmlEncode([ |
||
37 | 'formId' => $formId, |
||
38 | 'formName' => $formName, |
||
39 | 'attributes' => $this->attributes, |
||
40 | 'linkText' => \Yii::t('hipanel', 'Apply to all'), |
||
41 | ]); |
||
42 | $this->view->registerJs("\$('#$formId').applyToAll($options);"); |
||
43 | |||
44 | return parent::run(); |
||
45 | } |
||
46 | } |
||
47 |