コード例 #1
0
ファイル: BaseLanguageQuery.php プロジェクト: rapila/cms-base
 /**
  * Filter the query by a related PageString object
  *
  * @param   PageString|PropelObjectCollection $pageString  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 LanguageQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByPageString($pageString, $comparison = null)
 {
     if ($pageString instanceof PageString) {
         return $this->addUsingAlias(LanguagePeer::ID, $pageString->getLanguageId(), $comparison);
     } elseif ($pageString instanceof PropelObjectCollection) {
         return $this->usePageStringQuery()->filterByPrimaryKeys($pageString->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByPageString() only accepts arguments of type PageString or PropelCollection');
     }
 }
コード例 #2
0
 /**
  * Exclude object from result
  *
  * @param   PageString $pageString Object to remove from the list of results
  *
  * @return PageStringQuery The current query, for fluid interface
  */
 public function prune($pageString = null)
 {
     if ($pageString) {
         $this->addCond('pruneCond0', $this->getAliasedColName(PageStringPeer::PAGE_ID), $pageString->getPageId(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond1', $this->getAliasedColName(PageStringPeer::LANGUAGE_ID), $pageString->getLanguageId(), Criteria::NOT_EQUAL);
         $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
     }
     return $this;
 }