MCPcopy Create free account
hub / github.com/Rello/analytics / update

Method update

lib/Service/DatasetService.php:220–237  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 5

isOwnMethod · 0.95
providerMethod · 0.95
providerRemoveMethod · 0.95
readOwnMethod · 0.45

Tested by

no test coverage detected