* @return Content */ public static function retrieveByPK($con_category, $con_parent, $con_id, $con_lang, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $criteria = new Criteria(); $criteria->add(ContentPeer::CON_CATEGORY, $con_category); $criteria->add(ContentPeer::CON_PARENT, $con_parent); $criteria->add(ContentPeer::CON_ID, $con_id); $criteria->add(ContentPeer::CON_LANG, $con_lang); $v = ContentPeer::doSelect($criteria, $con); return !empty($v) ? $v[0] : null; } } // static code to register the map builder for this Peer with the main Propel class if (Propel::isInit()) { // the MapBuilder classes register themselves with Propel during initialization // so we need to load them here. try { BaseContentPeer::getMapBuilder(); } catch (Exception $e) { Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR); } } else { // even if Propel is not yet initialized, the map builder class can be registered // now and then it will be loaded when Propel initializes. require_once 'classes/model/map/ContentMapBuilder.php'; Propel::registerMapBuilder('classes.model.map.ContentMapBuilder'); }