示例#1
0
 public function getlist($param)
 {
     $this->criteria->addAscendingOrderByColumn(WebPageTemplatesPeer::NAME);
     $templatesTemp = WebPageTemplatesPeer::doSelect($this->criteria);
     $templates = array();
     foreach ($templatesTemp as $template) {
         $templates[] = $template->toArray();
     }
     $output = array('success' => 1, 'data' => $templates);
     $this->jsonwrapper->print_json($output);
 }
 public static function retrieveByPKs($pks, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria();
         $criteria->add(WebPageTemplatesPeer::ID, $pks, Criteria::IN);
         $objs = WebPageTemplatesPeer::doSelect($criteria, $con);
     }
     return $objs;
 }