protected function getMediaModelInstance($t2_object_id) { $obj = new FolderImage(); return $obj->setFolderId($t2_object_id); }
/** * Filter the query by a related \Thelia\Model\FolderImage object * * @param \Thelia\Model\FolderImage|ObjectCollection $folderImage the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderQuery The current query, for fluid interface */ public function filterByFolderImage($folderImage, $comparison = null) { if ($folderImage instanceof \Thelia\Model\FolderImage) { return $this->addUsingAlias(FolderTableMap::ID, $folderImage->getFolderId(), $comparison); } elseif ($folderImage instanceof ObjectCollection) { return $this->useFolderImageQuery()->filterByPrimaryKeys($folderImage->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByFolderImage() only accepts arguments of type \\Thelia\\Model\\FolderImage or Collection'); } }
/** * Filter the query by a related \Thelia\Model\FolderImage object * * @param \Thelia\Model\FolderImage|ObjectCollection $folderImage The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFolderImageI18nQuery The current query, for fluid interface */ public function filterByFolderImage($folderImage, $comparison = null) { if ($folderImage instanceof \Thelia\Model\FolderImage) { return $this->addUsingAlias(FolderImageI18nTableMap::ID, $folderImage->getId(), $comparison); } elseif ($folderImage instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(FolderImageI18nTableMap::ID, $folderImage->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByFolderImage() only accepts arguments of type \\Thelia\\Model\\FolderImage or Collection'); } }
/** * Declares an association between this object and a ChildFolderImage object. * * @param ChildFolderImage $v * @return \Thelia\Model\FolderImageI18n The current object (for fluent API support) * @throws PropelException */ public function setFolderImage(ChildFolderImage $v = null) { if ($v === null) { $this->setId(NULL); } else { $this->setId($v->getId()); } $this->aFolderImage = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildFolderImage object, it will not be re-added. if ($v !== null) { $v->addFolderImageI18n($this); } return $this; }
/** * Exclude object from result * * @param ChildFolderImage $folderImage Object to remove from the list of results * * @return ChildFolderImageQuery The current query, for fluid interface */ public function prune($folderImage = null) { if ($folderImage) { $this->addUsingAlias(FolderImageTableMap::ID, $folderImage->getId(), Criteria::NOT_EQUAL); } return $this; }