Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update EventsExt.php #57

Merged
merged 1 commit into from
Mar 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/Resources/contao/classes/EventsExt.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ protected function compile()
* @param array $arrCalendars
* @param int $intStart
* @param int $intEnd
* @param boolean $blnFeatured
* @return array
* @throws \Exception
*/
protected function getAllEvents($arrCalendars, $intStart, $intEnd)
protected function getAllEvents($arrCalendars, $intStart, $intEnd, $blnFeatured = null)
{
return $this->getAllEventsExt($arrCalendars, $intStart, $intEnd, array(null, true));
return $this->getAllEventsExt($arrCalendars, $intStart, $intEnd, array(null, true), $blnFeatured);
}


Expand All @@ -72,10 +73,11 @@ protected function getAllEvents($arrCalendars, $intStart, $intEnd)
* @param $intStart
* @param $intEnd
* @param null $arrParam
* @param boolean $blnFeatured
* @return array
* @throws \Exception
*/
protected function getAllEventsExt($arrCalendars, $intStart, $intEnd, $arrParam = null)
protected function getAllEventsExt($arrCalendars, $intStart, $intEnd, $arrParam = null, $blnFeatured = null)
{
# set default values...
$arrHolidays = null;
Expand Down Expand Up @@ -108,7 +110,7 @@ protected function getAllEventsExt($arrCalendars, $intStart, $intEnd, $arrParam
}

// Get the events of the current period
$objEvents = CalendarEventsModelExt::findCurrentByPid($id, $intStart, $intEnd);
$objEvents = CalendarEventsModelExt::findCurrentByPid($id, $intStart, $intEnd, array('showFeatured' => $blnFeatured));

if ($objEvents === null) {
continue;
Expand Down