/**
  * Constructs a new Internship object.
  */
 public function __construct(Student $student, $term, $location, $state, $country, Department $department, Agency $agency)
 {
     // Initialize student data
     $this->initalizeStudentData($student);
     // Initialize basic data
     $this->term = $term;
     // Set basic location data
     if ($location == 'domestic') {
         $this->setDomestic(true);
         $this->setInternational(false);
         $this->setLocationState($state);
     } else {
         if ($location == 'international') {
             $this->setDomestic(false);
             $this->setInternational(true);
             $this->setLocationCountry($country);
         } else {
             throw new \InvalidArgumentException('Invalid location.');
         }
     }
     // Get department id
     $this->department_id = $department->getId();
     // Get agency id
     $this->agency_id = $agency->getId();
     // Set initial state
     $this->setState(WorkflowStateFactory::getState('CreationState'));
     // Set initial OIED certification
     $this->setOiedCertified(false);
 }