/** * Filter the query by a related \App\Propel\News object * * @param \App\Propel\News|ObjectCollection $news the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceQuery The current query, for fluid interface */ public function filterByNewsRelatedByNewsFor($news, $comparison = null) { if ($news instanceof \App\Propel\News) { return $this->addUsingAlias(ResourceTableMap::COL_RESOURCE_ID, $news->getNewsFor(), $comparison); } elseif ($news instanceof ObjectCollection) { return $this->useNewsRelatedByNewsForQuery()->filterByPrimaryKeys($news->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByNewsRelatedByNewsFor() only accepts arguments of type \\App\\Propel\\News or Collection'); } }
/** * @param ChildNews $news The ChildNews object to add. */ protected function doAddNews(ChildNews $news) { $this->collNews[] = $news; $news->setFile($this); }
/** * Exclude object from result * * @param ChildNews $news Object to remove from the list of results * * @return $this|ChildNewsQuery The current query, for fluid interface */ public function prune($news = null) { if ($news) { $this->addUsingAlias(NewsTableMap::COL_NEWS_ID, $news->getNewsId(), Criteria::NOT_EQUAL); } return $this; }