コード例 #1
0
ファイル: VideoQuery.php プロジェクト: gossi/trixionary
 /**
  * Exclude object from result
  *
  * @param   ChildVideo $video Object to remove from the list of results
  *
  * @return $this|ChildVideoQuery The current query, for fluid interface
  */
 public function prune($video = null)
 {
     if ($video) {
         $this->addUsingAlias(VideoTableMap::COL_ID, $video->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
コード例 #2
0
ファイル: SkillQuery.php プロジェクト: gossi/trixionary
 /**
  * Filter the query by a related \gossi\trixionary\model\Video object
  *
  * @param \gossi\trixionary\model\Video|ObjectCollection $video The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildSkillQuery The current query, for fluid interface
  */
 public function filterByFeaturedTutorial($video, $comparison = null)
 {
     if ($video instanceof \gossi\trixionary\model\Video) {
         return $this->addUsingAlias(SkillTableMap::COL_TUTORIAL_ID, $video->getId(), $comparison);
     } elseif ($video instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(SkillTableMap::COL_TUTORIAL_ID, $video->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByFeaturedTutorial() only accepts arguments of type \\gossi\\trixionary\\model\\Video or Collection');
     }
 }