/** * Sets the markers of a button for confirming an event. The button will * only be visible if * - the current record is either a date or single event record * - the event is not confirmed yet * - the event has not started yet * In all other cases the corresponding subpart is hidden. * * @param tx_seminars_seminar $event the event to get the confirm button for * * @return void */ private function setConfirmButtonMarkers(tx_seminars_seminar $event) { $this->template->unhideSubpartsArray(array('CONFIRM_BUTTON')); $pageData = $this->page->getPageData(); if ($event->getRecordType() != tx_seminars_Model_Event::TYPE_TOPIC && !$event->isHidden() && !$event->isConfirmed() && !$event->hasStarted() && $GLOBALS['BE_USER']->check('tables_modify', $this->tableName) && $this->doesUserHaveAccess($event->getPageUid())) { $this->template->setMarker('uid', $event->getUid()); $buttonUrl = t3lib_BEfunc::getModuleUrl(self::MODULE_NAME, array('id' => $pageData['uid'])); $this->template->setMarker('confirm_button_url', htmlspecialchars($buttonUrl)); $this->template->setMarker('label_confirm_button', $GLOBALS['LANG']->getLL('eventlist_button_confirm')); } else { $this->template->hideSubpartsArray(array('CONFIRM_BUTTON')); } }