/** * Constructor. If nothing else, it also has to call the constructor of the parent * class, BlogAction with the same parameters */ function AdminEditLinkCategoryAction($actionInfo, $request) { $this->AdminAction($actionInfo, $request); // data validation $this->registerFieldValidator("categoryId", new IntegerValidator()); $this->_form->registerField("categoryName"); $view = new AdminLinkCategoriesListView($this->_blogInfo); $view->setErrorMessage($this->_locale->tr("error_incorrect_link_category_id")); $this->setValidationErrorView($view); }
/** * Constructor. If nothing else, it also has to call the constructor of the parent * class, BlogAction with the same parameters */ function AdminDeleteLinkCategoryAction($actionInfo, $request) { $this->AdminAction($actionInfo, $request); $this->_op = $actionInfo->getActionParamValue(); $view = new AdminLinkCategoriesListView($this->_blogInfo); if ($this->_op == "deleteLinkCategory") { $this->registerFieldValidator("categoryId", new IntegerValidator()); } else { $this->registerFieldValidator("categoryIds", new ArrayValidator()); } $view->setErrorMessage($this->_locale->tr("error_invalid_link_category_id")); $this->setValidationErrorView($view); }