Пример #1
0
 /**
  * Internal mechanism to set the ExtLang id
  * 
  * @param Localization $model
  * @param mixed $relatedId
  */
 protected function doSetExtLangId(Localization $model, $relatedId)
 {
     if ($model->getExtLanguageId() !== $relatedId) {
         $model->setExtLanguageId($relatedId);
         return true;
     }
     return false;
 }
Пример #2
0
 /**
  * Filter the query by a related \keeko\core\model\Localization object
  *
  * @param \keeko\core\model\Localization|ObjectCollection $localization the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildLanguageQuery The current query, for fluid interface
  */
 public function filterByLocalizationRelatedByExtLanguageId($localization, $comparison = null)
 {
     if ($localization instanceof \keeko\core\model\Localization) {
         return $this->addUsingAlias(LanguageTableMap::COL_ID, $localization->getExtLanguageId(), $comparison);
     } elseif ($localization instanceof ObjectCollection) {
         return $this->useLocalizationRelatedByExtLanguageIdQuery()->filterByPrimaryKeys($localization->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByLocalizationRelatedByExtLanguageId() only accepts arguments of type \\keeko\\core\\model\\Localization or Collection');
     }
 }