Пример #1
0
 /**
  * @param ChildSummary $summary The ChildSummary object to add.
  */
 protected function doAddSummary(ChildSummary $summary)
 {
     $this->collSummaries[] = $summary;
     $summary->setupdatedAt($this);
 }
Пример #2
0
 /**
  * Exclude object from result
  *
  * @param   ChildSummary $summary Object to remove from the list of results
  *
  * @return $this|ChildSummaryQuery The current query, for fluid interface
  */
 public function prune($summary = null)
 {
     if ($summary) {
         $this->addUsingAlias(SummaryTableMap::COL_ID, $summary->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Пример #3
0
 /**
  * Filter the query by a related \SpoilerWiki\Summary object
  *
  * @param \SpoilerWiki\Summary|ObjectCollection $summary 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 ChildContentAreaQuery The current query, for fluid interface
  */
 public function filterBySummary($summary, $comparison = null)
 {
     if ($summary instanceof \SpoilerWiki\Summary) {
         return $this->addUsingAlias(ContentAreaTableMap::COL_ID, $summary->getId(), $comparison);
     } elseif ($summary instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ContentAreaTableMap::COL_ID, $summary->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterBySummary() only accepts arguments of type \\SpoilerWiki\\Summary or Collection');
     }
 }
Пример #4
0
 /**
  * Filter the query by a related \SpoilerWiki\Summary object
  *
  * @param \SpoilerWiki\Summary|ObjectCollection $summary the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildTopicQuery The current query, for fluid interface
  */
 public function filterBySummary($summary, $comparison = null)
 {
     if ($summary instanceof \SpoilerWiki\Summary) {
         return $this->addUsingAlias(TopicTableMap::COL_ID, $summary->getTopicId(), $comparison);
     } elseif ($summary instanceof ObjectCollection) {
         return $this->useSummaryQuery()->filterByPrimaryKeys($summary->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterBySummary() only accepts arguments of type \\SpoilerWiki\\Summary or Collection');
     }
 }
Пример #5
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->aSnippet) {
         $this->aSnippet->removeContentArea($this);
     }
     if (null !== $this->aSummary) {
         $this->aSummary->removeContentArea($this);
     }
     $this->content = null;
     $this->active_version = null;
     $this->id = null;
     $this->version = null;
     $this->version_created_at = null;
     $this->version_created_by = null;
     $this->version_comment = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }