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

Method create

lib/Service/PanoramaService.php:136–143  ·  view source on GitHub ↗

* create new blank report * * @param $name * @param int $type * @param int $parent * @param $pages * @return int * @throws Exception */

(int $type, int $parent)

Source from the content-addressed store, hash-verified

134 * @throws Exception
135 */
136 public function create(int $type, int $parent): int {
137 if (!$this->isValidParent($parent)) {
138 return 0;
139 }
140 $reportId = $this->PanoramaMapper->create($this->l10n->t('New'), $type, $parent, '[]');
141 $this->ActivityManager->triggerEvent($reportId, ActivityManager::OBJECT_PANORAMA, ActivityManager::SUBJECT_PANORAMA_ADD);
142 return $reportId;
143 }
144
145 /**
146 * update report details

Callers 1

createGroupMethod · 0.45

Calls 3

isValidParentMethod · 0.95
triggerEventMethod · 0.80
tMethod · 0.45

Tested by

no test coverage detected