public function getLocalizations() { if ($this->localizations === null) { $c = new Criteria(); $c->clearSelectColumns(); $c->addSelectColumn(sfSimpleCMSSlotPeer::CULTURE); $c->add(sfSimpleCMSSlotPeer::PAGE_ID, $this->getId()); $c->setDistinct(); $rs = sfSimpleCMSSlotPeer::doSelectRS($c); if ($rs->getRecordCount() == 0) { return array(); } $localizations = array(); foreach ($rs as $set) { $localizations[] = $set[0]; } $this->localizations = $localizations; } return $this->localizations; }
public function countsfSimpleCMSSlots($criteria = null, $distinct = false, $con = null) { include_once 'plugins/sfSimpleCMSPlugin/lib/model/om/BasesfSimpleCMSSlotPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } $criteria->add(sfSimpleCMSSlotPeer::PAGE_ID, $this->getId()); return sfSimpleCMSSlotPeer::doCount($criteria, $distinct, $con); }
public static function retrieveByPK($page_id, $culture, $name, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $criteria = new Criteria(); $criteria->add(sfSimpleCMSSlotPeer::PAGE_ID, $page_id); $criteria->add(sfSimpleCMSSlotPeer::CULTURE, $culture); $criteria->add(sfSimpleCMSSlotPeer::NAME, $name); $v = sfSimpleCMSSlotPeer::doSelect($criteria, $con); return !empty($v) ? $v[0] : null; }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = sfSimpleCMSSlotPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setPageId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setCulture($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setName($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setType($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setValue($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setCreatedAt($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setUpdatedAt($arr[$keys[6]]); } }