Ejemplo n.º 1
0
 /**
  * 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');
     }
 }
Ejemplo n.º 2
0
 /**
  * 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;
 }
Ejemplo n.º 3
0
 /**
  * Declares an association between this object and a Language object.
  *
  * @param  Language $v
  * @return $this|\Tekstove\ApiBundle\Model\Lyric\LyricLanguage The current object (for fluent API support)
  * @throws PropelException
  */
 public function setLanguage(Language $v = null)
 {
     if ($v === null) {
         $this->setLanguageId(NULL);
     } else {
         $this->setLanguageId($v->getId());
     }
     $this->aLanguage = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Language object, it will not be re-added.
     if ($v !== null) {
         $v->addLyricLanguage($this);
     }
     return $this;
 }