示例#1
0
 public function executeLoadAttributes2()
 {
     #if (!$this->getRequestParameter('id', 0)) {
     $this->catalog = new Catalog();
     #}
     #else {
     #	$this->catalog = CatalogPeer::retrieveByPk($this->getRequestParameter('id'));
     #$this->forward404Unless($this->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();
     if ($template_code == 'e-book') {
         $this->setTemplate("tmplUpload");
     } else {
         $this->setTemplate("tmpl" . sfInflector::camelize(strtolower($template_code)));
     }
 }
示例#2
0
 public function getCatCategory($con = null)
 {
     include_once 'lib/model/om/BaseCatCategoryPeer.php';
     if ($this->aCatCategory === null && $this->cat_category_id !== null) {
         $this->aCatCategory = CatCategoryPeer::retrieveByPK($this->cat_category_id, $con);
     }
     return $this->aCatCategory;
 }
示例#3
0
 public function executeLoadAttributesNew()
 {
     $this->catalog = new 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)));
 }