public function getCategory() { $categoryID = $this->request->getVar('category'); if (!is_null($categoryID)) { return NewsCategory::get_by_id('NewsCategory', $categoryID); } }