protected function getCatalogueOrCreate($cat_id = 'cat_id') { if (!$this->getRequestParameter($cat_id)) { $catalogue = new Catalogue(); } else { $catalogue = CataloguePeer::retrieveByPk($this->getRequestParameter($cat_id)); $this->forward404Unless($catalogue); } return $catalogue; }