Commit 42b74bd5 by Carsten Brandt

Merge pull request #1986 from cebe/1984-abort-action-event

Mark event as handled when filter decides to abort action
parents 71e4d408 6944ca1f
......@@ -65,6 +65,7 @@ Yii Framework 2 Change Log
- Enh #1894: The path aliases `@webroot` and `@web` are now available right after the application is initialized (qiangxue)
- Enh #1921: Grid view ActionColumn now allow to name buttons like `{controller/action}` (creocoder)
- Enh #1973: `yii message/extract` is now able to generate `.po` files (SergeiKutanov, samdark)
- Enh #1984: ActionFilter will now mark event as handled when action run is aborted (cebe)
- Enh: Added `favicon.ico` and `robots.txt` to default application templates (samdark)
- Enh: Added `Widget::autoIdPrefix` to support prefixing automatically generated widget IDs (qiangxue)
- Enh: Support for file aliases in console command 'message' (omnilight)
......
......@@ -51,6 +51,9 @@ class ActionFilter extends Behavior
{
if ($this->isActive($event->action)) {
$event->isValid = $this->beforeAction($event->action);
if (!$event->isValid) {
$event->handled = true;
}
}
return $event->isValid;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment