Пример #1
0
 /**
  * Exclude object from result
  *
  * @param   ChildTemplates $templates Object to remove from the list of results
  *
  * @return $this|ChildTemplatesQuery The current query, for fluid interface
  */
 public function prune($templates = null)
 {
     if ($templates) {
         $this->addUsingAlias(TemplatesTableMap::COL_ID, $templates->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Пример #2
0
 /**
  * Declares an association between this object and a ChildTemplates object.
  *
  * @param  ChildTemplates $v
  * @return $this|\Data The current object (for fluent API support)
  * @throws PropelException
  */
 public function setTemplates(ChildTemplates $v = null)
 {
     if ($v === null) {
         $this->setFortemplatefield(NULL);
     } else {
         $this->setFortemplatefield($v->getId());
     }
     $this->aTemplates = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildTemplates object, it will not be re-added.
     if ($v !== null) {
         $v->addData($this);
     }
     return $this;
 }
Пример #3
0
 /**
  * Filter the query by a related \Templates object
  *
  * @param \Templates|ObjectCollection $templates 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 ChildDataQuery The current query, for fluid interface
  */
 public function filterByTemplates($templates, $comparison = null)
 {
     if ($templates instanceof \Templates) {
         return $this->addUsingAlias(DataTableMap::COL__FORTEMPLATEFIELD, $templates->getId(), $comparison);
     } elseif ($templates instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(DataTableMap::COL__FORTEMPLATEFIELD, $templates->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByTemplates() only accepts arguments of type \\Templates or Collection');
     }
 }