/** * @param ChildSnippet $snippet The ChildSnippet object to add. */ protected function doAddSnippet(ChildSnippet $snippet) { $this->collSnippets[] = $snippet; $snippet->setintroducedAt($this); }
/** * Filter the query by a related \SpoilerWiki\Snippet object * * @param \SpoilerWiki\Snippet|ObjectCollection $snippet the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTopicQuery The current query, for fluid interface */ public function filterBySnippet($snippet, $comparison = null) { if ($snippet instanceof \SpoilerWiki\Snippet) { return $this->addUsingAlias(TopicTableMap::COL_ID, $snippet->getTopicId(), $comparison); } elseif ($snippet instanceof ObjectCollection) { return $this->useSnippetQuery()->filterByPrimaryKeys($snippet->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterBySnippet() only accepts arguments of type \\SpoilerWiki\\Snippet or Collection'); } }
/** * Filter the query by a related \SpoilerWiki\Snippet object * * @param \SpoilerWiki\Snippet|ObjectCollection $snippet 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 ChildContentAreaQuery The current query, for fluid interface */ public function filterBySnippet($snippet, $comparison = null) { if ($snippet instanceof \SpoilerWiki\Snippet) { return $this->addUsingAlias(ContentAreaTableMap::COL_ID, $snippet->getId(), $comparison); } elseif ($snippet instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ContentAreaTableMap::COL_ID, $snippet->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterBySnippet() only accepts arguments of type \\SpoilerWiki\\Snippet or Collection'); } }
/** * 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->aSnippet) { $this->aSnippet->removeContentArea($this); } if (null !== $this->aSummary) { $this->aSummary->removeContentArea($this); } $this->content = null; $this->active_version = null; $this->id = null; $this->version = null; $this->version_created_at = null; $this->version_created_by = null; $this->version_comment = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->applyDefaultValues(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * Exclude object from result * * @param ChildSnippet $snippet Object to remove from the list of results * * @return $this|ChildSnippetQuery The current query, for fluid interface */ public function prune($snippet = null) { if ($snippet) { $this->addUsingAlias(SnippetTableMap::COL_ID, $snippet->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * @param ChildSnippet $snippet The ChildSnippet object to add. */ protected function doAddSnippet(ChildSnippet $snippet) { $this->collSnippets[] = $snippet; $snippet->settopic($this); }