Esempio n. 1
0
 /**
  * @see	wcf\system\option\OptionHandler::checkVisibility()
  */
 protected function checkVisibility(Option $option)
 {
     if ($this->user !== null) {
         $option->setUser($this->user);
     }
     if ($this->inRegistration && !$option->askDuringRegistration && !$option->required) {
         return false;
     }
     return $option->isVisible($this->overrideVisibility);
 }
Esempio n. 2
0
 /**
  * @see	\wcf\system\option\OptionHandler::checkVisibility()
  */
 protected function checkVisibility(Option $option)
 {
     if ($option->isDisabled) {
         return false;
     }
     // in registration
     if ($this->inRegistration && !$option->askDuringRegistration && !$option->required && ($option->optionName != 'birthday' || !REGISTER_MIN_USER_AGE)) {
         return false;
     }
     // search mode
     if ($this->searchMode && !$option->searchable) {
         return false;
     }
     if ($this->conditionMode && !$this->getTypeObject($option->optionType) instanceof ISearchableConditionUserOption) {
         return false;
     }
     if ($this->user !== null) {
         $option->setUser($this->user);
     }
     if ($this->editMode) {
         return $option->isEditable();
     } else {
         if (!$this->conditionMode) {
             return $option->isVisible();
         }
     }
     return true;
 }
Esempio n. 3
0
	/**
	 * @see	wcf\system\option\OptionHandler::checkVisibility()
	 */
	protected function checkVisibility(Option $option) {
		if ($option->isDisabled) {
			return false;
		}
		
		// in registration
		if ($this->inRegistration && !$option->askDuringRegistration && !$option->required) {
			return false;
		}
		
		// search mode
		if ($this->searchMode && !$option->searchable) {
			return false;
		}
		
		if ($this->user !== null) {
			$option->setUser($this->user);
		}
		
		if ($this->editMode) {
			return $option->isEditable();
		}
		else {
			return $option->isVisible();
		}
	}