Example #1
0
 /**
  * Set job
  *
  * @param Job $job
  *
  * @return \Akeneo\Bundle\BatchBundle\Entity\JobInstance
  */
 public function setJob($job)
 {
     $this->job = $job;
     if ($job) {
         //TODO: FIXME to get only the jobConfiguration instead of merging it
         //with the jobConfiguration:
         //$this->rawConfiguration = $job->getConfiguration();
         // Waiting for the ImportExport fixes on the right uses of the configuration
         // See https://magecore.atlassian.net/browse/BAP-2601
         $jobConfiguration = $job->getConfiguration();
         if (is_array($this->rawConfiguration) && count($this->rawConfiguration) > 0) {
             $this->rawConfiguration = array_merge($this->rawConfiguration, $jobConfiguration);
         } else {
             $this->rawConfiguration = $jobConfiguration;
         }
     }
     return $this;
 }