* create new blank report * * @param $name * @param int $type * @param int $parent * @param $pages * @return int * @throws Exception */
(int $type, int $parent)
| 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 |
no test coverage detected