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

Method create

lib/Service/PanoramaService.php:163–170  ·  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

161 * @throws Exception
162 */
163 public function create(int $type, int $parent): int {
164 if (!$this->isValidParent($parent)) {
165 return 0;
166 }
167 $reportId = $this->PanoramaMapper->create($this->l10n->t('New'), $type, $parent, '[]');
168 $this->ActivityManager->triggerEvent($reportId, ActivityManager::OBJECT_PANORAMA, ActivityManager::SUBJECT_PANORAMA_ADD);
169 return $reportId;
170 }
171
172 /**
173 * 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