/**
  * Internal mechanism to set the Parent id
  * 
  * @param Localization $model
  * @param mixed $relatedId
  */
 protected function doSetParentId(Localization $model, $relatedId)
 {
     if ($model->getParentId() !== $relatedId) {
         $model->setParentId($relatedId);
         return true;
     }
     return false;
 }
Exemple #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 ChildLocalizationQuery The current query, for fluid interface
  */
 public function filterByLocalizationRelatedById($localization, $comparison = null)
 {
     if ($localization instanceof \keeko\core\model\Localization) {
         return $this->addUsingAlias(LocalizationTableMap::COL_ID, $localization->getParentId(), $comparison);
     } elseif ($localization instanceof ObjectCollection) {
         return $this->useLocalizationRelatedByIdQuery()->filterByPrimaryKeys($localization->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByLocalizationRelatedById() only accepts arguments of type \\keeko\\core\\model\\Localization or Collection');
     }
 }