main/core/Manager/Task/ScheduledTaskManager.php
public function update(array $data, ScheduledTask $scheduledTask)
    {
        $errors = $this->validate($data);
        if (count($errors) > 0) {
            throw new InvalidDataException('Scheduled task is not valid', $errors);
        }

        $scheduledTask = $this->om->getObject($data, ScheduledTask::class);
        $this->serializer->deserialize($data, $scheduledTask);

        $this->om->persist($scheduledTask);
        $this->om->flush();

        return $scheduledTask;
    }
public function update(array $data, ScheduledTask $scheduledTask)
    {
        $errors = $this->validate($data);
        if (count($errors) > 0) {
            throw new InvalidDataException('Scheduled task is not valid', $errors);
        }

        $scheduledTask = $this->om->getObject($data, ScheduledTask::class);
        $this->serializer->deserialize($data, $scheduledTask);

        $this->om->persist($scheduledTask);
        $this->om->flush();

        return $scheduledTask;
    }
public function update ( array $ data , ScheduledTask $ scheduledTask ) { $ errors = $ this -> validate ( $ data ) ; if ( count ( $ errors ) > 0 ) { throw new InvalidDataException ( 'Scheduled task is not valid' , $ errors ) ; } $ scheduledTask = $ this -> om -> getObject ( $ data , ScheduledTask :: class ) ; $ this -> serializer -> deserialize ( $ data , $ scheduledTask ) ; $ this -> om -> persist ( $ scheduledTask ) ; $ this -> om -> flush ( ) ; return $ scheduledTask ; }
Updates a ScheduledTask.

@param array         $data
@param ScheduledTask $scheduledTask

@return ScheduledTask

@throws InvalidDataException
Updates a ScheduledTask .