/** * Clears the current object, sets all attributes to their default values and removes * outgoing references as well as back-references (from other objects to this one. Results probably in a database * change of those foreign objects when you call `save` there). */ public function clear() { if (null !== $this->aInvoice) { $this->aInvoice->removeBill($this); } if (null !== $this->aTask) { $this->aTask->removeBill($this); } $this->task_id = null; $this->invoice_id = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * @param ChildTask $task The ChildTask object to add. */ protected function doAddTask(ChildTask $task) { $this->collTasks[] = $task; $task->setProject($this); }
/** * @param ChildTask $task The ChildTask object to add. */ protected function doAddTask(ChildTask $task) { $this->collTasks[] = $task; $task->setEmployee($this); }
/** * Exclude object from result * * @param ChildTask $task Object to remove from the list of results * * @return $this|ChildTaskQuery The current query, for fluid interface */ public function prune($task = null) { if ($task) { $this->addUsingAlias(TaskTableMap::COL_ID, $task->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \Task object * * @param \Task|ObjectCollection $task the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProjectQuery The current query, for fluid interface */ public function filterByTask($task, $comparison = null) { if ($task instanceof \Task) { return $this->addUsingAlias(ProjectTableMap::COL_ID, $task->getProjectId(), $comparison); } elseif ($task instanceof ObjectCollection) { return $this->useTaskQuery()->filterByPrimaryKeys($task->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByTask() only accepts arguments of type \\Task or Collection'); } }
/** * Filter the query by a related \Task object * * @param \Task|ObjectCollection $task 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 ChildBillQuery The current query, for fluid interface */ public function filterByTask($task, $comparison = null) { if ($task instanceof \Task) { return $this->addUsingAlias(BillTableMap::COL_TASK_ID, $task->getId(), $comparison); } elseif ($task instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(BillTableMap::COL_TASK_ID, $task->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByTask() only accepts arguments of type \\Task or Collection'); } }