/** * Filter the query by a related \App\Propel\FileType object * * @param \App\Propel\FileType|ObjectCollection $fileType 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 ChildFileTypeI18nQuery The current query, for fluid interface */ public function filterByFileType($fileType, $comparison = null) { if ($fileType instanceof \App\Propel\FileType) { return $this->addUsingAlias(FileTypeI18nTableMap::COL_FILE_TYPE_ID, $fileType->getFileTypeId(), $comparison); } elseif ($fileType instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(FileTypeI18nTableMap::COL_FILE_TYPE_ID, $fileType->toKeyValue('PrimaryKey', 'FileTypeId'), $comparison); } else { throw new PropelException('filterByFileType() only accepts arguments of type \\App\\Propel\\FileType or Collection'); } }
/** * Declares an association between this object and a ChildFileType object. * * @param ChildFileType $v * @return $this|\App\Propel\File The current object (for fluent API support) * @throws PropelException */ public function setFileType(ChildFileType $v = null) { if ($v === null) { $this->setFileTypeId(NULL); } else { $this->setFileTypeId($v->getFileTypeId()); } $this->aFileType = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildFileType object, it will not be re-added. if ($v !== null) { $v->addFile($this); } return $this; }
/** * Exclude object from result * * @param ChildFileType $fileType Object to remove from the list of results * * @return $this|ChildFileTypeQuery The current query, for fluid interface */ public function prune($fileType = null) { if ($fileType) { $this->addUsingAlias(FileTypeTableMap::COL_FILE_TYPE_ID, $fileType->getFileTypeId(), Criteria::NOT_EQUAL); } return $this; }