示例#1
0
 /**
  * Method called to associate a ChildImportCategoryI18n object to this object
  * through the ChildImportCategoryI18n foreign key attribute.
  *
  * @param    ChildImportCategoryI18n $l ChildImportCategoryI18n
  * @return   \Thelia\Model\ImportCategory The current object (for fluent API support)
  */
 public function addImportCategoryI18n(ChildImportCategoryI18n $l)
 {
     if ($l && ($locale = $l->getLocale())) {
         $this->setLocale($locale);
         $this->currentTranslations[$locale] = $l;
     }
     if ($this->collImportCategoryI18ns === null) {
         $this->initImportCategoryI18ns();
         $this->collImportCategoryI18nsPartial = true;
     }
     if (!in_array($l, $this->collImportCategoryI18ns->getArrayCopy(), true)) {
         // only add it if the **same** object is not already associated
         $this->doAddImportCategoryI18n($l);
     }
     return $this;
 }
 /**
  * Exclude object from result
  *
  * @param   ChildImportCategoryI18n $importCategoryI18n Object to remove from the list of results
  *
  * @return ChildImportCategoryI18nQuery The current query, for fluid interface
  */
 public function prune($importCategoryI18n = null)
 {
     if ($importCategoryI18n) {
         $this->addCond('pruneCond0', $this->getAliasedColName(ImportCategoryI18nTableMap::ID), $importCategoryI18n->getId(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond1', $this->getAliasedColName(ImportCategoryI18nTableMap::LOCALE), $importCategoryI18n->getLocale(), Criteria::NOT_EQUAL);
         $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
     }
     return $this;
 }