/** * Assigns variables to the template engine. */ public function assignVariables() { // call assignVariables event EventHandler::fireAction($this, 'assignVariables'); // assign variables WCF::getTPL()->assign(array('isRegistered' => WCF::getUser()->userID > 0, 'canAddContest' => WCF::getUser()->getPermission('user.contest.canAddContest'), 'availableClasses' => $this->classList ? $this->classList->getObjects() : array(), 'availableJurys' => $this->juryList ? $this->juryList->getObjects() : array(), 'availableParticipants' => $this->participantList ? $this->participantList->getObjects() : array(), 'availableSponsors' => $this->sponsorList ? $this->sponsorList->getObjects() : array(), 'availablePrices' => $this->priceList ? $this->priceList->getObjects() : array(), 'availableTags' => MODULE_TAGGING ? $this->tagList->getObjects() : array(), 'latestEntries' => $this->latestEntryList ? $this->latestEntryList->getObjects() : array(), 'latestSolutions' => $this->latestSolutionList ? $this->latestSolutionList->getObjects() : array(), 'advertiseParticipant' => $this->advertiseParticipant, 'advertiseSponsor' => $this->advertiseSponsor, 'advertiseJury' => $this->advertiseJury)); }
/** * @see Form::assignVariables() */ public function assignVariables() { parent::assignVariables(); // display branding require_once WCF_DIR . 'lib/util/ContestUtil.class.php'; ContestUtil::assignVariablesBranding(); // display branding require_once WCF_DIR . 'lib/util/ContestUtil.class.php'; ContestUtil::assignVariablesBranding(); // save invitations if ($this->entry->isOwner()) { require_once WCF_DIR . 'lib/form/ContestSponsorInviteForm.class.php'; new ContestSponsorInviteForm($this->entry); } // init form if ($this->action == 'edit') { require_once WCF_DIR . 'lib/form/ContestSponsorEditForm.class.php'; new ContestSponsorEditForm($this->entry); } else { if ($this->entry->isSponsorable()) { require_once WCF_DIR . 'lib/form/ContestSponsorAddForm.class.php'; new ContestSponsorAddForm($this->entry); } } if ($this->entry->enableSponsorCheck && !$this->entry->isSponsor()) { WCF::getTPL()->append('additionalContentBecomeSponsor', '<p class="info">' . WCF::getLanguage()->get('wcf.contest.enableSponsorCheck.info') . '</p>'); } if ($this->entry->isEnabledJury() && $this->entry->state == 'closed') { WCF::getTPL()->append('userMessages', '<p class="info">' . WCF::getLanguage()->get('wcf.contest.jury.closed.info') . '</p>'); // init todo list require_once WCF_DIR . 'lib/data/contest/sponsor/todo/ContestSponsorTodoList.class.php'; $this->todoList = new ContestSponsorTodoList(); $this->todoList->sqlConditions .= 'contest_sponsor.contestID = ' . $this->contestID; $this->todoList->readObjects(); } $this->sidebar->assignVariables(); WCF::getTPL()->assign(array('entry' => $this->entry, 'isSponsor' => $this->isSponsor, 'contestID' => $this->contestID, 'userID' => $this->entry->userID, 'sponsors' => $this->sponsorList->getObjects(), 'todos' => $this->todoList ? $this->todoList->getObjects() : array(), 'templateName' => $this->templateName, 'allowSpidersToIndexThisPage' => true, 'contestmenu' => ContestMenu::getInstance())); }