/** * @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; }
/** * @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(); } }