"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "docs/guide/structure-filters.md" between
yii2-2.0.35.tar.gz and yii2-2.0.36.tar.gz

About: Yii 2 is a high-performance component-based PHP framework for developing large-scale Web applications (source).

structure-filters.md  (yii2-2.0.35):structure-filters.md  (yii2-2.0.36)
skipping to change at line 36 skipping to change at line 36
return $q->from('user')->max('updated_at'); return $q->from('user')->max('updated_at');
}, },
], ],
]; ];
} }
``` ```
By default, filters declared in a controller class will be applied to *all* acti ons in that controller. You can, By default, filters declared in a controller class will be applied to *all* acti ons in that controller. You can,
however, explicitly specify which actions the filter should be applied to by con figuring the however, explicitly specify which actions the filter should be applied to by con figuring the
[[yii\base\ActionFilter::only|only]] property. In the above example, the `HttpCa che` filter only applies to the [[yii\base\ActionFilter::only|only]] property. In the above example, the `HttpCa che` filter only applies to the
`index` and `view` actions. You can also configure the [[yii\base\ActionFilter:: except|except]] property to blacklist `index` and `view` actions. You can also configure the [[yii\base\ActionFilter:: except|except]] property to prevent
some actions from being filtered. some actions from being filtered.
Besides controllers, you can also declare filters in a [module](structure-module s.md) or [application](structure-applications.md). Besides controllers, you can also declare filters in a [module](structure-module s.md) or [application](structure-applications.md).
When you do so, the filters will be applied to *all* controller actions belongin g to that module or application, When you do so, the filters will be applied to *all* controller actions belongin g to that module or application,
unless you configure the filters' [[yii\base\ActionFilter::only|only]] and [[yii \base\ActionFilter::except|except]] unless you configure the filters' [[yii\base\ActionFilter::only|only]] and [[yii \base\ActionFilter::except|except]]
properties like described above. properties like described above.
> Note: When declaring filters in modules or applications, you should use [route s](structure-controllers.md#routes) > Note: When declaring filters in modules or applications, you should use [route s](structure-controllers.md#routes)
instead of action IDs in the [[yii\base\ActionFilter::only|only]] and [[yii\ba se\ActionFilter::except|except]] properties. instead of action IDs in the [[yii\base\ActionFilter::only|only]] and [[yii\ba se\ActionFilter::except|except]] properties.
This is because action IDs alone cannot fully specify actions within the scope of a module or application. This is because action IDs alone cannot fully specify actions within the scope of a module or application.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)