Пример #1
0
 function Exists($ConCategory, $ConParent, $ConId, $ConLang)
 {
     try {
         $oPro = ContentPeer::retrieveByPk($ConCategory, $ConParent, $ConId, $ConLang);
         if (is_object($oPro) && get_class($oPro) == 'Content') {
             return true;
         } else {
             return false;
         }
     } catch (Exception $oError) {
         throw $oError;
     }
 }
Пример #2
0
 /**
  * Get the associated Content object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Content The associated Content object.
  * @throws     PropelException
  */
 public function getContent(PropelPDO $con = null)
 {
     if ($this->aContent === null && $this->content_id !== null) {
         $this->aContent = ContentPeer::retrieveByPk($this->content_id);
         /* The following can be used additionally to
         		   guarantee the related object contains a reference
         		   to this object.  This level of coupling may, however, be
         		   undesirable since it could result in an only partially populated collection
         		   in the referenced object.
         		   $this->aContent->addCmspages($this);
         		 */
     }
     return $this->aContent;
 }