/** * Sets the markers of a button for sending an e-mail to the attendees of an * event. * * The button will only be visible if the event has at least one registration. * * @param tx_seminars_seminar $event the event to get the e-mail button for * * @return void */ private function setEmailButtonMarkers(tx_seminars_seminar $event) { if (!$event->hasAttendances()) { $this->template->hideSubpartsArray(array('EMAIL_BUTTON')); return; } $this->template->unhideSubpartsArray(array('EMAIL_BUTTON')); $pageData = $this->page->getPageData(); $this->template->setMarker('uid', $event->getUid()); $buttonUrl = t3lib_BEfunc::getModuleUrl(self::MODULE_NAME, array('id' => $pageData['uid'])); $this->template->setMarker('email_button_url', htmlspecialchars($buttonUrl)); $this->template->setMarker('label_email_button', $GLOBALS['LANG']->getLL('eventlist_button_email')); }