/** * Declares an association between this object and a ChildContentDocument object. * * @param ChildContentDocument $v * @return \Thelia\Model\ContentDocumentI18n The current object (for fluent API support) * @throws PropelException */ public function setContentDocument(ChildContentDocument $v = null) { if ($v === null) { $this->setId(NULL); } else { $this->setId($v->getId()); } $this->aContentDocument = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildContentDocument object, it will not be re-added. if ($v !== null) { $v->addContentDocumentI18n($this); } return $this; }
/** * Filter the query by a related \Thelia\Model\ContentDocument object * * @param \Thelia\Model\ContentDocument|ObjectCollection $contentDocument The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentDocumentI18nQuery The current query, for fluid interface */ public function filterByContentDocument($contentDocument, $comparison = null) { if ($contentDocument instanceof \Thelia\Model\ContentDocument) { return $this->addUsingAlias(ContentDocumentI18nTableMap::ID, $contentDocument->getId(), $comparison); } elseif ($contentDocument instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ContentDocumentI18nTableMap::ID, $contentDocument->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByContentDocument() only accepts arguments of type \\Thelia\\Model\\ContentDocument or Collection'); } }
/** * Filter the query by a related \Thelia\Model\ContentDocument object * * @param \Thelia\Model\ContentDocument|ObjectCollection $contentDocument the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentQuery The current query, for fluid interface */ public function filterByContentDocument($contentDocument, $comparison = null) { if ($contentDocument instanceof \Thelia\Model\ContentDocument) { return $this->addUsingAlias(ContentTableMap::ID, $contentDocument->getContentId(), $comparison); } elseif ($contentDocument instanceof ObjectCollection) { return $this->useContentDocumentQuery()->filterByPrimaryKeys($contentDocument->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByContentDocument() only accepts arguments of type \\Thelia\\Model\\ContentDocument or Collection'); } }
/** * Exclude object from result * * @param ChildContentDocument $contentDocument Object to remove from the list of results * * @return ChildContentDocumentQuery The current query, for fluid interface */ public function prune($contentDocument = null) { if ($contentDocument) { $this->addUsingAlias(ContentDocumentTableMap::ID, $contentDocument->getId(), Criteria::NOT_EQUAL); } return $this; }
protected function getMediaModelInstance($t2_object_id) { $obj = new ContentDocument(); return $obj->setContentId($t2_object_id); }