예제 #1
0
 /**
  * Set comment
  *
  * @param \Opit\OpitHrm\LeaveBundle\Entity\CommentLeaveStatus $comment
  * @return StatesLeaveRequests
  */
 public function setComment(CommentApplicantStatus $comment = null)
 {
     $comment->setStatus($this);
     $this->comment = $comment;
     return $this;
 }
예제 #2
0
 /**
  * Method to create applicant status and add a comment to it
  * 
  * @param \Opit\OpitHrm\HiringBundle\Entity\StatesApplicants $status
  * @param \Opit\OpitHrm\UserBundle\Entity\User $createdUser
  * @param \Opit\OpitHrm\HiringBundle\Entity\Applicant $applicant
  * @param type $content
  * @return \Opit\OpitHrm\HiringBundle\Entity\StatesApplicants
  */
 protected function createApplicantState(Status $status, User $createdUser, Applicant $applicant, $content = '')
 {
     $status = new StatesApplicants($status);
     $status->setCreated(new \DateTime());
     $status->setCreatedUser($createdUser);
     $status->setApplicant($applicant);
     $comment = new CommentApplicantStatus();
     $comment->setContent($content);
     $comment->setCreated(new \DateTime());
     $comment->setCreatedUser($createdUser);
     $comment->setStatus($status);
     $status->setComment($comment);
     return $status;
 }