/** * 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->aLyric) { $this->aLyric->removeLyricLanguage($this); } if (null !== $this->aLanguage) { $this->aLanguage->removeLyricLanguage($this); } $this->lyric_id = null; $this->language_id = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * Exclude object from result * * @param ChildLanguage $language Object to remove from the list of results * * @return $this|ChildLanguageQuery The current query, for fluid interface */ public function prune($language = null) { if ($language) { $this->addUsingAlias(LanguageTableMap::COL_ID, $language->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \Tekstove\ApiBundle\Model\Language object * * @param \Tekstove\ApiBundle\Model\Language|ObjectCollection $language 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 ChildLyricLanguageQuery The current query, for fluid interface */ public function filterByLanguage($language, $comparison = null) { if ($language instanceof \Tekstove\ApiBundle\Model\Language) { return $this->addUsingAlias(LyricLanguageTableMap::COL_LANGUAGE_ID, $language->getId(), $comparison); } elseif ($language instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(LyricLanguageTableMap::COL_LANGUAGE_ID, $language->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByLanguage() only accepts arguments of type \\Tekstove\\ApiBundle\\Model\\Language or Collection'); } }