Conditions | 2 |
Paths | 1 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
26 | public function behaviors() |
||
27 | { |
||
28 | return ArrayHelper::merge( |
||
29 | parent::behaviors(), |
||
30 | [ |
||
31 | 'redirect' => [ |
||
32 | 'class' => CallableFilter::class, |
||
33 | 'actions' => [ |
||
34 | 'callback' => function () { |
||
35 | $redirectUrl = Patron::getInstance()->getSession()->getRedirectUrl(); |
||
36 | Patron::getInstance()->getSession()->removeAll(); |
||
37 | |||
38 | if ($redirectUrl) { |
||
39 | return $this->redirect($redirectUrl); |
||
40 | } |
||
41 | } |
||
42 | ] |
||
43 | ] |
||
44 | ] |
||
45 | ); |
||
46 | } |
||
47 | |||
80 |