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

Method update

lib/Service/ReportService.php:332–353  ·  view source on GitHub ↗

* update report details * * @param int $reportId * @param $name * @param $subheader * @param int $parent * @param $options * @param $visualization * @param $chart * @param $chartoptions * @param $dataoptions * @param $dimension1 * @param $dimension2 * @param $value * @return bool * @throws Exception */

(
		int $reportId,
			$name,
			$subheader,
		int $parent,
			$options,
			$visualization,
			$chart,
			$chartoptions,
			$dataoptions,
			$dimension1 = null,
			$dimension2 = null,
			$value = null

Source from the content-addressed store, hash-verified

330 * @throws Exception
331 */
332 public function update(
333 int $reportId,
334 $name,
335 $subheader,
336 int $parent,
337 $options,
338 $visualization,
339 $chart,
340 $chartoptions,
341 $dataoptions,
342 $dimension1 = null,
343 $dimension2 = null,
344 $value = null
345 ) {
346 $report = $this->ReportMapper->readOwn($reportId);
347 if (empty($report) || !$this->isValidParent($parent, $reportId)) {
348 return false;
349 }
350 $options = $this->datasourceController->encodeOptionsForStorage((int)$report['type'], $options);
351
352 return $this->ReportMapper->update($reportId, $name, $subheader, $parent, $options, $visualization, $chart, $chartoptions, $dataoptions, $dimension1, $dimension2, $value);
353 }
354
355 /**
356 * Delete Dataset and all depending objects

Callers 1

importMethod · 0.45

Calls 3

isValidParentMethod · 0.95
readOwnMethod · 0.45

Tested by

no test coverage detected