예제 #1
0
파일: Localization.php 프로젝트: keeko/core
 /**
  * Declares an association between this object and a ChildLanguage object.
  *
  * @param  ChildLanguage $v
  * @return $this|\keeko\core\model\Localization The current object (for fluent API support)
  * @throws PropelException
  */
 public function setExtLang(ChildLanguage $v = null)
 {
     if ($v === null) {
         $this->setExtLanguageId(NULL);
     } else {
         $this->setExtLanguageId($v->getId());
     }
     $this->aExtLang = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildLanguage object, it will not be re-added.
     if ($v !== null) {
         $v->addLocalizationRelatedByExtLanguageId($this);
     }
     return $this;
 }
예제 #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;
 }
예제 #3
0
파일: Language.php 프로젝트: keeko/core
 /**
  * Declares an association between this object and a ChildLanguage object.
  *
  * @param  ChildLanguage $v
  * @return $this|\keeko\core\model\Language The current object (for fluent API support)
  * @throws PropelException
  */
 public function setParent(ChildLanguage $v = null)
 {
     if ($v === null) {
         $this->setParentId(NULL);
     } else {
         $this->setParentId($v->getId());
     }
     $this->aParent = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildLanguage object, it will not be re-added.
     if ($v !== null) {
         $v->addSublanguage($this);
     }
     return $this;
 }
예제 #4
0
 /**
  * Filter the query by a related \keeko\core\model\Language object
  *
  * @param \keeko\core\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 ChildLocalizationQuery The current query, for fluid interface
  */
 public function filterByExtLang($language, $comparison = null)
 {
     if ($language instanceof \keeko\core\model\Language) {
         return $this->addUsingAlias(LocalizationTableMap::COL_EXT_LANGUAGE_ID, $language->getId(), $comparison);
     } elseif ($language instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(LocalizationTableMap::COL_EXT_LANGUAGE_ID, $language->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByExtLang() only accepts arguments of type \\keeko\\core\\model\\Language or Collection');
     }
 }