/**
  * Remove templates of this object
  * through the R_fieldpostprocessor_forfield cross reference table.
  *
  * @param ChildTemplates $templates
  * @return ChildFieldpostprocessor The current object (for fluent API support)
  */
 public function removeTemplates(ChildTemplates $templates)
 {
     if ($this->getTemplatess()->contains($templates)) {
         $rFieldpostprocessorForfield = new ChildRFieldpostprocessorForfield();
         $rFieldpostprocessorForfield->setTemplates($templates);
         if ($templates->isFieldpostprocessorsLoaded()) {
             //remove the back reference if available
             $templates->getFieldpostprocessors()->removeObject($this);
         }
         $rFieldpostprocessorForfield->setFieldpostprocessor($this);
         $this->removeRFieldpostprocessorForfield(clone $rFieldpostprocessorForfield);
         $rFieldpostprocessorForfield->clear();
         $this->collTemplatess->remove($this->collTemplatess->search($templates));
         if (null === $this->templatessScheduledForDeletion) {
             $this->templatessScheduledForDeletion = clone $this->collTemplatess;
             $this->templatessScheduledForDeletion->clear();
         }
         $this->templatessScheduledForDeletion->push($templates);
     }
     return $this;
 }
Esempio n. 2
0
 /**
  * Filter the query by a related \RFieldpostprocessorForfield object
  *
  * @param \RFieldpostprocessorForfield|ObjectCollection $rFieldpostprocessorForfield the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildTemplatesQuery The current query, for fluid interface
  */
 public function filterByRFieldpostprocessorForfield($rFieldpostprocessorForfield, $comparison = null)
 {
     if ($rFieldpostprocessorForfield instanceof \RFieldpostprocessorForfield) {
         return $this->addUsingAlias(TemplatesTableMap::COL_ID, $rFieldpostprocessorForfield->getTemplateid(), $comparison);
     } elseif ($rFieldpostprocessorForfield instanceof ObjectCollection) {
         return $this->useRFieldpostprocessorForfieldQuery()->filterByPrimaryKeys($rFieldpostprocessorForfield->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByRFieldpostprocessorForfield() only accepts arguments of type \\RFieldpostprocessorForfield or Collection');
     }
 }
 /**
  * Exclude object from result
  *
  * @param   ChildRFieldpostprocessorForfield $rFieldpostprocessorForfield Object to remove from the list of results
  *
  * @return $this|ChildRFieldpostprocessorForfieldQuery The current query, for fluid interface
  */
 public function prune($rFieldpostprocessorForfield = null)
 {
     if ($rFieldpostprocessorForfield) {
         $this->addCond('pruneCond0', $this->getAliasedColName(RFieldpostprocessorForfieldTableMap::COL__POSTPROCESSORID), $rFieldpostprocessorForfield->getPostprocessorid(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond1', $this->getAliasedColName(RFieldpostprocessorForfieldTableMap::COL__TEMPLATEID), $rFieldpostprocessorForfield->getTemplateid(), Criteria::NOT_EQUAL);
         $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
     }
     return $this;
 }