/**
  * @see	\wcf\page\IPage::readParameters()
  */
 public function readParameters()
 {
     parent::readParameters();
     I18nHandler::getInstance()->register('optionName');
     I18nHandler::getInstance()->register('optionDescription');
     // get available categories
     $categoryList = new UserOptionCategoryList();
     $categoryList->getConditionBuilder()->add('parentCategoryName = ?', array('profile'));
     $categoryList->readObjects();
     $this->availableCategories = $categoryList->getObjects();
 }
 /**
  * Creates the given category if necessary.
  * 
  * @param	string		$name
  */
 protected function createCategory($name)
 {
     if ($this->categoryCache === null) {
         // get existing categories
         $list = new UserOptionCategoryList();
         $list->getConditionBuilder()->add('categoryName = ? OR parentCategoryName = ?', array('profile', 'profile'));
         $list->readObjects();
         foreach ($list->getObjects() as $category) {
             $this->categoryCache[] = $category->categoryName;
         }
     }
     if (!in_array($name, $this->categoryCache)) {
         // create category
         UserOptionCategoryEditor::create(array('packageID' => 1, 'categoryName' => $name, 'parentCategoryName' => 'profile'));
         $this->categoryCache[] = $name;
     }
 }