Download the PHP package inspiredminds/contao-news-filter-event without Composer
On this page you can find all versions of the php package inspiredminds/contao-news-filter-event. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download inspiredminds/contao-news-filter-event
More information about inspiredminds/contao-news-filter-event
Files in inspiredminds/contao-news-filter-event
Package contao-news-filter-event
Short Description Contao extension that provides an event to filter a news list.
License LGPL-3.0-or-later
Homepage https://github.com/inspiredminds/contao-news-filter-event
Informations about the package contao-news-filter-event
Contao News Filter Event
Contao provides a way to output custom news items in the news list module via the newsListFetchItems
hook. However,
if two or more extensions want to filter the news items according to some parameters, only one can win. This Contao
extension instead provides a NewsFilterEvent
where you can basically customize the parameters of the
NewsModel::findBy()
call that will fetch the news items from the database. Multiple extensions can add their
conditions and thus the news list can be filtered down by multiple parameters provided by these different extensions.
For example, the following event listener would filter the news list via an author query parameter:
See here for further examples.
All versions of contao-news-filter-event with dependencies
contao/news-bundle Version ^4.9 || ^5.0
symfony/dependency-injection Version ^4.4 || ^5.4 || ^6.2
symfony/http-kernel Version ^4.4 || ^5.4 || ^6.2