예제 #1
0
 public function executePrintList()
 {
     $id = $this->getRequestParameter('id');
     $catalog = CatalogPeer::retrieveByPK($id);
     $this->forward404Unless($catalog);
     $this->catalog = $catalog;
 }
예제 #2
0
 public function getCatalog($con = null)
 {
     include_once 'lib/model/om/BaseCatalogPeer.php';
     if ($this->aCatalog === null && $this->catalog_id !== null) {
         $this->aCatalog = CatalogPeer::retrieveByPK($this->catalog_id, $con);
     }
     return $this->aCatalog;
 }
예제 #3
0
 public function executeLoadAttributes()
 {
     #if (!$this->getRequestParameter('id', 0)) {
     #    $this->catalog = new Catalog();
     #} else {
     #$this->cat_id = $this->getRequestParameter('cat_id');
     #$catalog = CatalogPeer::retrieveByPk($this->getRequestParameter('id'));
     #$this->forward404Unless($this->catalog);
     #}
     $id = $this->getRequestParameter('id');
     if ($id == '' || $id == null) {
         return;
     }
     $catalog = CatalogPeer::retrieveByPK($id);
     $this->catalog = $catalog;
     $cc_id = $this->getRequestParameter('cat_category_id');
     if ($cc_id == '' || $cc_id == null) {
         return;
     }
     $cc = CatCategoryPeer::retrieveByPK($cc_id);
     $template_code = $cc->getCatTemplate()->getCode();
     $this->setTemplate("tmpl" . sfInflector::camelize(strtolower($template_code)));
 }