/**
  * Filter the query by a related \App\Models\TranslationLanguage object
  *
  * @param \App\Models\TranslationLanguage|ObjectCollection $translationLanguage 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 ChildTranslationLanguageKeywordQuery The current query, for fluid interface
  */
 public function filterByTranslationLanguage($translationLanguage, $comparison = null)
 {
     if ($translationLanguage instanceof \App\Models\TranslationLanguage) {
         return $this->addUsingAlias(TranslationLanguageKeywordTableMap::COL_LANGUAGE_ID, $translationLanguage->getId(), $comparison);
     } elseif ($translationLanguage instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TranslationLanguageKeywordTableMap::COL_LANGUAGE_ID, $translationLanguage->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByTranslationLanguage() only accepts arguments of type \\App\\Models\\TranslationLanguage or Collection');
     }
 }
Example #2
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aProfessor) {
         $this->aProfessor->removeAdminUser($this);
     }
     if (null !== $this->aStudent) {
         $this->aStudent->removeAdminUser($this);
     }
     if (null !== $this->aTranslationLanguage) {
         $this->aTranslationLanguage->removeAdminUser($this);
     }
     $this->id = null;
     $this->language_id = null;
     $this->professor_id = null;
     $this->student_id = null;
     $this->name = null;
     $this->login = null;
     $this->password = null;
     $this->email = null;
     $this->status = null;
     $this->remember_token = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
 /**
  * Exclude object from result
  *
  * @param   ChildTranslationLanguage $translationLanguage Object to remove from the list of results
  *
  * @return $this|ChildTranslationLanguageQuery The current query, for fluid interface
  */
 public function prune($translationLanguage = null)
 {
     if ($translationLanguage) {
         $this->addUsingAlias(TranslationLanguageTableMap::COL_ID, $translationLanguage->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aTranslationLanguage) {
         $this->aTranslationLanguage->removeTranslationLanguageKeyword($this);
     }
     if (null !== $this->aTranslationKeyword) {
         $this->aTranslationKeyword->removeTranslationLanguageKeyword($this);
     }
     $this->language_id = null;
     $this->keyword_id = null;
     $this->translation = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }