* get dataset details * * @param int $datasetId * @param $name * @param null $dimension1 * @param null $dimension2 * @param null $value * @param null $subheader * @param null $aiIndex * @return bool * @throws Exception */
(int $datasetId, $name, $subheader, $dimension1, $dimension2, $value, $aiIndex)
| 218 | * @throws Exception |
| 219 | */ |
| 220 | public function update(int $datasetId, $name, $subheader, $dimension1, $dimension2, $value, $aiIndex) { |
| 221 | if (!$this->isOwn($datasetId)) { |
| 222 | return false; |
| 223 | } |
| 224 | $dataset = $this->DatasetMapper->readOwn($datasetId); |
| 225 | if (($dataset['storage_mode'] ?? 'legacy') !== 'legacy') { |
| 226 | return false; |
| 227 | } |
| 228 | $dbUpdate = $this->DatasetMapper->update($datasetId, $name, $subheader, $dimension1, $dimension2, $value, $aiIndex); |
| 229 | $this->ReportMapper->increaseVersionByDataset($datasetId); |
| 230 | |
| 231 | if ($aiIndex === 1) { |
| 232 | $this->provider($datasetId); |
| 233 | } else { |
| 234 | $this->providerRemove($datasetId); |
| 235 | } |
| 236 | return $dbUpdate; |
| 237 | } |
| 238 | |
| 239 | public function createGroup(int $parent = 0): int { |
| 240 | return $this->DatasetMapper->createGroup($this->l10n->t('New'), $parent); |
nothing calls this directly
no test coverage detected