/**
  * @see Page::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     // display branding
     require_once WCF_DIR . 'lib/util/ContestUtil.class.php';
     ContestUtil::assignVariablesBranding();
     WCF::getTPL()->assign(array('entries' => $this->entryList->getObjects()));
 }
 /**
  * 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 EventListener::execute()
  */
 public function execute($eventObj, $className, $eventName)
 {
     if (MODULE_CONTEST == 1 && PROFILE_SHOW_LAST_CONTEST_ENTRIES == 1 && WCF::getUser()->getPermission('user.contest.canViewContest') && $eventObj->frame->getUser()->getPermission('user.contest.canUseContest')) {
         // get entries
         require_once WCF_DIR . 'lib/data/contest/ContestList.class.php';
         $entryList = new ContestList();
         $entryList->sqlConditions .= 'contest.userID = ' . $eventObj->frame->getUserID();
         $count = $entryList->countObjects();
         if ($count > 0) {
             $entryList->sqlLimit = 5;
             $entryList->readObjects();
             WCF::getTPL()->assign(array('user' => $eventObj->frame->getUser(), 'entries' => $entryList->getObjects(), 'contestEntries' => $count));
             WCF::getTPL()->append('additionalContent3', WCF::getTPL()->fetch('userProfileContest'));
         }
     }
 }
 /**
  * @see Page::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     // display branding
     require_once WCF_DIR . 'lib/util/ContestUtil.class.php';
     ContestUtil::assignVariablesBranding();
     $this->sidebar->assignVariables();
     WCF::getTPL()->assign(array('entries' => $this->entryList->getObjects(), 'description' => $this->description, 'classes' => $this->entryList->getClasses(), 'todos' => $this->todoList ? $this->todoList->getObjects() : array(), 'tags' => $this->entryList->getTags(), 'availableTags' => $this->tags, 'tagID' => $this->tagID, 'juryID' => $this->juryID, 'participantID' => $this->participantID, 'classID' => $this->classID, 'tag' => $this->tag, 'taggableID' => $this->taggable !== null ? $this->taggable->getTaggableID() : 0, 'allowSpidersToIndexThisPage' => true));
 }