/** * Clears the current object, sets all attributes to their default values and removes * outgoing references as well as back-references (from other objects to this one. Results probably in a database * change of those foreign objects when you call `save` there). */ public function clear() { if (null !== $this->atopic) { $this->atopic->removeSnippet($this); } if (null !== $this->aintroducedAt) { $this->aintroducedAt->removeSnippet($this); } $this->id = null; $this->topic_id = null; $this->introduced_at = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * @param ChildTopic $topic The ChildTopic object to add. */ protected function doAddTopic(ChildTopic $topic) { $this->collTopics[] = $topic; $topic->setcanon($this); }
/** * @param ChildTopic $topic The ChildTopic object to add. */ protected function doAddTopic(ChildTopic $topic) { $this->collTopics[] = $topic; $topic->setintroducedAt($this); }
/** * Filter the query by a related \SpoilerWiki\Topic object * * @param \SpoilerWiki\Topic|ObjectCollection $topic 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 ChildSummaryQuery The current query, for fluid interface */ public function filterBytopic($topic, $comparison = null) { if ($topic instanceof \SpoilerWiki\Topic) { return $this->addUsingAlias(SummaryTableMap::COL_TOPIC_ID, $topic->getId(), $comparison); } elseif ($topic instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(SummaryTableMap::COL_TOPIC_ID, $topic->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterBytopic() only accepts arguments of type \\SpoilerWiki\\Topic or Collection'); } }
/** * Exclude object from result * * @param ChildTopic $topic Object to remove from the list of results * * @return $this|ChildTopicQuery The current query, for fluid interface */ public function prune($topic = null) { if ($topic) { $this->addUsingAlias(TopicTableMap::COL_ID, $topic->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \SpoilerWiki\Topic object * * @param \SpoilerWiki\Topic|ObjectCollection $topic the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCanonQuery The current query, for fluid interface */ public function filterByTopic($topic, $comparison = null) { if ($topic instanceof \SpoilerWiki\Topic) { return $this->addUsingAlias(CanonTableMap::COL_ID, $topic->getCanonId(), $comparison); } elseif ($topic instanceof ObjectCollection) { return $this->useTopicQuery()->filterByPrimaryKeys($topic->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByTopic() only accepts arguments of type \\SpoilerWiki\\Topic or Collection'); } }