/** * Filter the query by a related \Thelia\Model\ContentImage object * * @param \Thelia\Model\ContentImage|ObjectCollection $contentImage The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildContentImageI18nQuery The current query, for fluid interface */ public function filterByContentImage($contentImage, $comparison = null) { if ($contentImage instanceof \Thelia\Model\ContentImage) { return $this->addUsingAlias(ContentImageI18nTableMap::ID, $contentImage->getId(), $comparison); } elseif ($contentImage instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ContentImageI18nTableMap::ID, $contentImage->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByContentImage() only accepts arguments of type \\Thelia\\Model\\ContentImage or Collection'); } }
/** * Exclude object from result * * @param ChildContentImage $contentImage Object to remove from the list of results * * @return ChildContentImageQuery The current query, for fluid interface */ public function prune($contentImage = null) { if ($contentImage) { $this->addUsingAlias(ContentImageTableMap::ID, $contentImage->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a ChildContentImage object. * * @param ChildContentImage $v * @return \Thelia\Model\ContentImageI18n The current object (for fluent API support) * @throws PropelException */ public function setContentImage(ChildContentImage $v = null) { if ($v === null) { $this->setId(NULL); } else { $this->setId($v->getId()); } $this->aContentImage = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildContentImage object, it will not be re-added. if ($v !== null) { $v->addContentImageI18n($this); } return $this; }
/** * Filter the query by a related \Thelia\Model\ContentImage object * * @param \Thelia\Model\ContentImage|ObjectCollection $contentImage 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 filterByContentImage($contentImage, $comparison = null) { if ($contentImage instanceof \Thelia\Model\ContentImage) { return $this->addUsingAlias(ContentTableMap::ID, $contentImage->getContentId(), $comparison); } elseif ($contentImage instanceof ObjectCollection) { return $this->useContentImageQuery()->filterByPrimaryKeys($contentImage->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByContentImage() only accepts arguments of type \\Thelia\\Model\\ContentImage or Collection'); } }
protected function getMediaModelInstance($t2_object_id) { $obj = new ContentImage(); return $obj->setContentId($t2_object_id); }