/** * Filter the query by a related \App\Propel\ResourceType object * * @param \App\Propel\ResourceType|ObjectCollection $resourceType 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 ChildResourceTypeI18nQuery The current query, for fluid interface */ public function filterByResourceType($resourceType, $comparison = null) { if ($resourceType instanceof \App\Propel\ResourceType) { return $this->addUsingAlias(ResourceTypeI18nTableMap::COL_RESOURCE_TYPE_ID, $resourceType->getResourceTypeId(), $comparison); } elseif ($resourceType instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ResourceTypeI18nTableMap::COL_RESOURCE_TYPE_ID, $resourceType->toKeyValue('PrimaryKey', 'ResourceTypeId'), $comparison); } else { throw new PropelException('filterByResourceType() only accepts arguments of type \\App\\Propel\\ResourceType or Collection'); } }
/** * Declares an association between this object and a ChildResourceType object. * * @param ChildResourceType $v * @return $this|\App\Propel\ResourceTypeI18n The current object (for fluent API support) * @throws PropelException */ public function setResourceType(ChildResourceType $v = null) { if ($v === null) { $this->setResourceTypeId(NULL); } else { $this->setResourceTypeId($v->getResourceTypeId()); } $this->aResourceType = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildResourceType object, it will not be re-added. if ($v !== null) { $v->addResourceTypeI18n($this); } return $this; }
/** * Exclude object from result * * @param ChildResourceType $resourceType Object to remove from the list of results * * @return $this|ChildResourceTypeQuery The current query, for fluid interface */ public function prune($resourceType = null) { if ($resourceType) { $this->addUsingAlias(ResourceTypeTableMap::COL_RESOURCE_TYPE_ID, $resourceType->getResourceTypeId(), Criteria::NOT_EQUAL); } return $this; }