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

Method update

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

303 * @throws Exception
304 */
305 public function update(
306 int $reportId,
307 $name,
308 $subheader,
309 int $parent,
310 $options,
311 $visualization,
312 $chart,
313 $chartoptions,
314 $dataoptions,
315 $dimension1 = null,
316 $dimension2 = null,
317 $value = null
318 ) {
319 if (!$this->isOwn($reportId) || !$this->isValidParent($parent, $reportId)) {
320 return false;
321 }
322 $array = json_decode($options, true);
323 foreach ($array as $key => $tmpValue) {
324 $array[$key] = htmlspecialchars($tmpValue, ENT_NOQUOTES, 'UTF-8');
325 }
326 $options = json_encode($array);
327
328 return $this->ReportMapper->update($reportId, $name, $subheader, $parent, $options, $visualization, $chart, $chartoptions, $dataoptions, $dimension1, $dimension2, $value);
329 }
330
331 /**
332 * 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