/**
  * @see	\wcf\system\menu\user\profile\content\IUserProfileMenuContent::getContent()
  */
 public function getContent($userID)
 {
     if ($this->optionHandler === null) {
         $this->optionHandler = new UserOptionHandler(false, '', 'profile');
         $this->optionHandler->enableEditMode(false);
         $this->optionHandler->showEmptyOptions(false);
     }
     $user = new User($userID);
     $this->optionHandler->setUser($user);
     WCF::getTPL()->assign(array('options' => $this->optionHandler->getOptionTree(), 'userID' => $user->userID));
     return WCF::getTPL()->fetch('userProfileAbout');
 }
Beispiel #2
0
 /**
  * @see	\wcf\page\Page::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     WCF::getTPL()->assign(array('optionTree' => $this->optionHandler->getOptionTree(), 'category' => $this->category));
     // static options
     if ($this->category == 'general') {
         WCF::getTPL()->assign(array('availableContentLanguages' => $this->availableContentLanguages, 'availableLanguages' => $this->availableLanguages, 'availableStyles' => $this->availableStyles, 'contentLanguageIDs' => $this->contentLanguageIDs, 'languageID' => $this->languageID, 'styleID' => $this->styleID));
     }
 }
 /**
  * Returns the user option handler object.
  * 
  * @param	\wcf\data\user\User	$user
  * @param	boolean			$editMode
  * @return	\wcf\system\option\user\UserOptionHandler
  */
 protected function getOptionHandler(User $user, $editMode = true)
 {
     $optionHandler = new UserOptionHandler(false, '', 'profile');
     if (!$editMode) {
         $optionHandler->showEmptyOptions(false);
         $optionHandler->enableEditMode(false);
     }
     $optionHandler->setUser($user);
     return $optionHandler;
 }
 /**
  * @see	\wcf\system\condition\ICondition::setData()
  */
 public function setData(Condition $condition)
 {
     $this->optionHandler->setOptionValues($condition->conditionData['optionValues']);
 }
 /**
  * @see	\wcf\page\IPage::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     WCF::getTPL()->assign(array('optionTree' => $this->optionHandler->getOptionTree(), 'applyChangesToExistingUsers' => $this->applyChangesToExistingUsers));
 }