/** * Internal mechanism to set the Language id * * @param Localization $model * @param mixed $relatedId */ protected function doSetLanguageId(Localization $model, $relatedId) { if ($model->getLanguageId() !== $relatedId) { $model->setLanguageId($relatedId); return true; } return false; }
/** * 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 filterByLocalizationRelatedByLanguageId($localization, $comparison = null) { if ($localization instanceof \keeko\core\model\Localization) { return $this->addUsingAlias(LanguageTableMap::COL_ID, $localization->getLanguageId(), $comparison); } elseif ($localization instanceof ObjectCollection) { return $this->useLocalizationRelatedByLanguageIdQuery()->filterByPrimaryKeys($localization->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByLocalizationRelatedByLanguageId() only accepts arguments of type \\keeko\\core\\model\\Localization or Collection'); } }