Ejemplo n.º 1
0
 /**
  * List
  */
 public function executeList()
 {
     $this->output = array();
     $c = new Criteria();
     $c->addAscendingOrderByColumn(DomainPeer::NAME);
     foreach (DomainPeer::doSelect($c) as $domain) {
         $data = $domain->toArray(BasePeer::TYPE_FIELDNAME);
         $data['needs_commit'] = $domain->needsComit();
         $data['records'] = array();
         $this->output[] = $data;
     }
     if ($this->isAjax()) {
         return $this->renderStore('Domain', $this->output);
     }
 }
Ejemplo n.º 2
0
 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(DomainPeer::ID, $pks, Criteria::IN);
         $objs = DomainPeer::doSelect($criteria, $con);
     }
     return $objs;
 }