Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | private function registerJs() |
||
34 | { |
||
35 | $referrer = Yii::$app->request->referrer; |
||
36 | |||
37 | $this->view->registerJs(/** @lang JavaScript */" |
||
38 | $('#back-link').on('click', () => { |
||
39 | const phpReferrer = '{$referrer}'; |
||
40 | |||
41 | (phpReferrer === '') ? window.history.go(-1) : window.location.href = phpReferrer; |
||
42 | }); |
||
43 | "); |
||
44 | } |
||
45 | } |
||
46 |