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

Method update

lib/Service/ReportService.php:338–362  ·  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

336 * @throws Exception
337 */
338 public function update(
339 int $reportId,
340 $name,
341 $subheader,
342 int $parent,
343 $options,
344 $visualization,
345 $chart,
346 $chartoptions,
347 $dataoptions,
348 $dimension1 = null,
349 $dimension2 = null,
350 $value = null
351 ) {
352 if (!$this->isOwn($reportId) || !$this->isValidParent($parent, $reportId)) {
353 return false;
354 }
355 $array = json_decode($options, true);
356 foreach ($array as $key => $tmpValue) {
357 $array[$key] = htmlspecialchars($tmpValue, ENT_NOQUOTES, 'UTF-8');
358 }
359 $options = json_encode($array);
360
361 return $this->ReportMapper->update($reportId, $name, $subheader, $parent, $options, $visualization, $chart, $chartoptions, $dataoptions, $dimension1, $dimension2, $value);
362 }
363
364 /**
365 * Delete Dataset and all depending objects

Callers 1

importMethod · 0.45

Calls 2

isOwnMethod · 0.95
isValidParentMethod · 0.95

Tested by

no test coverage detected