Esempio n. 1
0
 /**
  * Filter the query by a related \keeko\core\model\LanguageType object
  *
  * @param \keeko\core\model\LanguageType|ObjectCollection $languageType 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 ChildLanguageQuery The current query, for fluid interface
  */
 public function filterByType($languageType, $comparison = null)
 {
     if ($languageType instanceof \keeko\core\model\LanguageType) {
         return $this->addUsingAlias(LanguageTableMap::COL_TYPE_ID, $languageType->getId(), $comparison);
     } elseif ($languageType instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(LanguageTableMap::COL_TYPE_ID, $languageType->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByType() only accepts arguments of type \\keeko\\core\\model\\LanguageType or Collection');
     }
 }
Esempio n. 2
0
 /**
  * Declares an association between this object and a ChildLanguageType object.
  *
  * @param  ChildLanguageType $v
  * @return $this|\keeko\core\model\Language The current object (for fluent API support)
  * @throws PropelException
  */
 public function setType(ChildLanguageType $v = null)
 {
     if ($v === null) {
         $this->setTypeId(NULL);
     } else {
         $this->setTypeId($v->getId());
     }
     $this->aType = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildLanguageType object, it will not be re-added.
     if ($v !== null) {
         $v->addLanguage($this);
     }
     return $this;
 }
Esempio n. 3
0
 /**
  * Exclude object from result
  *
  * @param   ChildLanguageType $languageType Object to remove from the list of results
  *
  * @return $this|ChildLanguageTypeQuery The current query, for fluid interface
  */
 public function prune($languageType = null)
 {
     if ($languageType) {
         $this->addUsingAlias(LanguageTypeTableMap::COL_ID, $languageType->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }