/** * @param Tax $object * @return int */ protected function getObjectId($object) { return $object->getId(); }
/** * Exclude object from result * * @param ChildTax $tax Object to remove from the list of results * * @return ChildTaxQuery The current query, for fluid interface */ public function prune($tax = null) { if ($tax) { $this->addUsingAlias(TaxTableMap::ID, $tax->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a ChildTax object. * * @param ChildTax $v * @return \Thelia\Model\TaxRuleCountry The current object (for fluent API support) * @throws PropelException */ public function setTax(ChildTax $v = null) { if ($v === null) { $this->setTaxId(NULL); } else { $this->setTaxId($v->getId()); } $this->aTax = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildTax object, it will not be re-added. if ($v !== null) { $v->addTaxRuleCountry($this); } return $this; }
/** * Filter the query by a related \Thelia\Model\Tax object * * @param \Thelia\Model\Tax|ObjectCollection $tax The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildTaxRuleCountryQuery The current query, for fluid interface */ public function filterByTax($tax, $comparison = null) { if ($tax instanceof \Thelia\Model\Tax) { return $this->addUsingAlias(TaxRuleCountryTableMap::TAX_ID, $tax->getId(), $comparison); } elseif ($tax instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(TaxRuleCountryTableMap::TAX_ID, $tax->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByTax() only accepts arguments of type \\Thelia\\Model\\Tax or Collection'); } }