* update dataload * * @NoAdminRequired * @param int $dataloadId * @param $name * @param $option * @param $schedule * @return bool */
(int $dataloadId, $name, $option, $schedule, $storageMapping = null)
| 131 | * @return bool |
| 132 | */ |
| 133 | public function update(int $dataloadId, $name, $option, $schedule, $storageMapping = null) { |
| 134 | $name = $this->truncate($name, 64); |
| 135 | $sql = $this->db->getQueryBuilder(); |
| 136 | $sql->update(self::TABLE_NAME)->set('name', $sql->createNamedParameter($name)) |
| 137 | ->set('option', $sql->createNamedParameter($option))->set('schedule', $sql->createNamedParameter($schedule)) |
| 138 | ->where($sql->expr()->eq('user_id', $sql->createNamedParameter($this->userId)))->andWhere($sql->expr() |
| 139 | ->eq('id', $sql->createNamedParameter($dataloadId))); |
| 140 | if ($storageMapping !== null) { |
| 141 | $sql->set('storage_mapping', $sql->createNamedParameter($storageMapping)); |
| 142 | } |
| 143 | $sql->executeStatement(); |
| 144 | return true; |
| 145 | } |
| 146 | |
| 147 | /** |
| 148 | * copy a data load |