/** * Post action after completing an event creation to redirect either to the event listing for the event item. * * @author Jason Rey <*****@*****.**> * @since 1.3 * @access public * @param SocialEvent $event The SocialEvent object. */ public function complete($event) { // Recurring support // If no recurring data, then just redirect accordingly. // If event is in pending, then also redirect accordingly. if (empty($event->recurringData) || $event->isPending()) { $this->info->set($this->getMessage()); if ($event->isPublished()) { return $this->redirect(FRoute::events(array('layout' => 'item', 'id' => $event->getAlias()), false)); } return $this->redirect(FRoute::events(array(), false)); } // If has recurring data, then we need to show the complete page to create all the necessary recurring events FD::page()->breadcrumb(JText::_('COM_EASYSOCIAL_PAGE_TITLE_EVENTS'), FRoute::events()); FD::page()->breadcrumb($event->getName(), $event->getPermalink()); FD::page()->breadcrumb(JText::_('COM_EASYSOCIAL_PAGE_TITLE_CREATE_RECURRING_EVENT')); FD::page()->title(JText::_('COM_EASYSOCIAL_PAGE_TITLE_CREATE_RECURRING_EVENT')); // Get the recurring schedule $schedule = FD::model('Events')->getRecurringSchedule(array('eventStart' => $event->getEventStart(), 'end' => $event->recurringData->end, 'type' => $event->recurringData->type, 'daily' => $event->recurringData->daily)); $this->set('schedule', $schedule); $this->set('event', $event); echo parent::display('site/events/createRecurring'); }