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

Method create

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

173 * @throws Exception
174 */
175 public function create(int $type, int $parent): int {
176 if (!$this->isValidParent($parent)) {
177 return 0;
178 }
179 $reportId = $this->PanoramaMapper->create($this->l10n->t('New'), $type, $parent, '[]');
180 $this->ActivityManager->triggerEvent($reportId, ActivityManager::OBJECT_PANORAMA, ActivityManager::SUBJECT_PANORAMA_ADD);
181 return $reportId;
182 }
183
184 /**
185 * 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