コード例 #1
0
ファイル: Employee.php プロジェクト: xama5/uver-erp
 /**
  * @param ChildProject $project The ChildProject object to add.
  */
 protected function doAddProject(ChildProject $project)
 {
     $this->collProjects[] = $project;
     $project->setEmployee($this);
 }
コード例 #2
0
ファイル: TaskQuery.php プロジェクト: xama5/uver-erp
 /**
  * Filter the query by a related \Project object
  *
  * @param \Project|ObjectCollection $project 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 ChildTaskQuery The current query, for fluid interface
  */
 public function filterByProject($project, $comparison = null)
 {
     if ($project instanceof \Project) {
         return $this->addUsingAlias(TaskTableMap::COL_PROJECT_ID, $project->getId(), $comparison);
     } elseif ($project instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TaskTableMap::COL_PROJECT_ID, $project->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByProject() only accepts arguments of type \\Project or Collection');
     }
 }
コード例 #3
0
ファイル: CustomerQuery.php プロジェクト: xama5/uver-erp
 /**
  * Filter the query by a related \Project object
  *
  * @param \Project|ObjectCollection $project the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildCustomerQuery The current query, for fluid interface
  */
 public function filterByProject($project, $comparison = null)
 {
     if ($project instanceof \Project) {
         return $this->addUsingAlias(CustomerTableMap::COL_ID, $project->getCustomerId(), $comparison);
     } elseif ($project instanceof ObjectCollection) {
         return $this->useProjectQuery()->filterByPrimaryKeys($project->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByProject() only accepts arguments of type \\Project or Collection');
     }
 }
コード例 #4
0
ファイル: ProjectQuery.php プロジェクト: xama5/uver-erp
 /**
  * Exclude object from result
  *
  * @param   ChildProject $project Object to remove from the list of results
  *
  * @return $this|ChildProjectQuery The current query, for fluid interface
  */
 public function prune($project = null)
 {
     if ($project) {
         $this->addUsingAlias(ProjectTableMap::COL_ID, $project->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
コード例 #5
0
ファイル: Customer.php プロジェクト: xama5/uver-erp
 /**
  * @param ChildProject $project The ChildProject object to add.
  */
 protected function doAddProject(ChildProject $project)
 {
     $this->collProjects[] = $project;
     $project->setCustomer($this);
 }
コード例 #6
0
ファイル: Task.php プロジェクト: xama5/uver-erp
 /**
  * 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->aEmployee) {
         $this->aEmployee->removeTask($this);
     }
     if (null !== $this->aProject) {
         $this->aProject->removeTask($this);
     }
     $this->id = null;
     $this->title = null;
     $this->description = null;
     $this->worktime = null;
     $this->project_id = null;
     $this->employee_id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }