Esempio n. 1
0
 /**
  * Sets a single ChildContentArea object as related to this object by a one-to-one relationship.
  *
  * @param  ChildContentArea $v ChildContentArea
  * @return $this|\SpoilerWiki\Snippet The current object (for fluent API support)
  * @throws PropelException
  */
 public function setContentArea(ChildContentArea $v = null)
 {
     $this->singleContentArea = $v;
     // Make sure that that the passed-in ChildContentArea isn't already associated with this object
     if ($v !== null && $v->getSnippet(null, false) === null) {
         $v->setSnippet($this);
     }
     return $this;
 }
Esempio n. 2
0
 /**
  * Filter the query by a related \SpoilerWiki\ContentArea object
  *
  * @param \SpoilerWiki\ContentArea|ObjectCollection $contentArea the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildSummaryQuery The current query, for fluid interface
  */
 public function filterByContentArea($contentArea, $comparison = null)
 {
     if ($contentArea instanceof \SpoilerWiki\ContentArea) {
         return $this->addUsingAlias(SummaryTableMap::COL_ID, $contentArea->getId(), $comparison);
     } elseif ($contentArea instanceof ObjectCollection) {
         return $this->useContentAreaQuery()->filterByPrimaryKeys($contentArea->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByContentArea() only accepts arguments of type \\SpoilerWiki\\ContentArea or Collection');
     }
 }
 /**
  * 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->aContentArea) {
         $this->aContentArea->removeContentAreaVersion($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);
 }
 /**
  * Exclude object from result
  *
  * @param   ChildContentArea $contentArea Object to remove from the list of results
  *
  * @return $this|ChildContentAreaQuery The current query, for fluid interface
  */
 public function prune($contentArea = null)
 {
     if ($contentArea) {
         $this->addUsingAlias(ContentAreaTableMap::COL_ID, $contentArea->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
 /**
  * Filter the query by a related \SpoilerWiki\ContentArea object
  *
  * @param \SpoilerWiki\ContentArea|ObjectCollection $contentArea 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 ChildContentAreaVersionQuery The current query, for fluid interface
  */
 public function filterByContentArea($contentArea, $comparison = null)
 {
     if ($contentArea instanceof \SpoilerWiki\ContentArea) {
         return $this->addUsingAlias(ContentAreaVersionTableMap::COL_ID, $contentArea->getId(), $comparison);
     } elseif ($contentArea instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ContentAreaVersionTableMap::COL_ID, $contentArea->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByContentArea() only accepts arguments of type \\SpoilerWiki\\ContentArea or Collection');
     }
 }