Example #1
0
 public function findStudentLastNotValidatedCourses(Student $student, $limit = 5)
 {
     return $this->createQueryBuilder('c')->join('c.student', 's')->where('c.validated = false')->andWhere('s.id = :student_id')->orderBy('c.createdAt', 'DESC')->setMaxResults($limit)->setParameter(':student_id', $student->getId())->getQuery()->getResult();
 }
Example #2
0
 public function getRealPrice(Student $student)
 {
     $price = $this->getPrice();
     $surcharge = $student->getSurcharge() * $this->getTime();
     return $price + $surcharge;
 }
Example #3
0
 /**
  * Remove student
  *
  * @param \Mathsup\UserBundle\Entity\Student $students
  */
 public function removeStudent(\Mathsup\UserBundle\Entity\Student $student)
 {
     $student->removeProfessor($this);
 }