/** * Constructor. If nothing else, it also has to call the constructor of the parent * class, BlogAction with the same parameters */ function AdminEditBlogAction($actionInfo, $request) { $this->SiteAdminAction($actionInfo, $request); // data validation $this->registerFieldValidator("blogId", new IntegerValidator()); $view = new AdminSiteBlogsListView($this->_blogInfo); $view->setErrorMessage($this->_locale->tr("error_incorrect_blog_id")); $this->setValidationErrorView($view); }
function AdminDeleteBlogAction($actionInfo, $request) { $this->SiteAdminAction($actionInfo, $request); // set up the data validation stuff $this->_op = $actionInfo->getActionParamValue(); if ($this->_op == "deleteBlogs") { $this->registerFieldvalidator("blogIds", new ArrayValidator()); } else { $this->registerFieldValidator("blogId", new IntegerValidator()); } $view = new AdminSiteBlogsListView($this->_blogInfo); $view->setErrorMessage($this->_locale->tr("error_no_blogs_selected")); $this->setValidationErrorView($view); }