Skip to content

Commit

Permalink
Update EventsExt.php
Browse files Browse the repository at this point in the history
Should fix #56 and should have currently no influence on CalendarEventsModelExt
as the original check https://github.com/contao/calendar-bundle/blob/09dd5df46c4bcc4b8bffb785cf86a106c58110a5/src/Resources/contao/models/CalendarEventsModel.php#L267-L277 is missing in CalendarEventsModelExt.
  • Loading branch information
tarun-uwe authored Mar 24, 2022
1 parent 21e1d75 commit e2f056c
Showing 1 changed file with 6 additions and 4 deletions.
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

0 comments on commit e2f056c

Please sign in to comment.