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

Method create

lib/Controller/ShareController.php:59–67  ·  view source on GitHub ↗

* create a new share * * @param $item_type * @param $item_source * @param $type * @param $user * @return DataResponse * @throws Exception */

($item_type, $item_source, $type, $user)

Source from the content-addressed store, hash-verified

57 * @throws Exception
58 */
59 #[NoAdminRequired]
60 public function create($item_type, $item_source, $type, $user) {
61 if (($item_type === ShareService::SHARE_ITEM_TYPE_REPORT && $this->ReportService->isOwn($item_source))
62 || ($item_type === ShareService::SHARE_ITEM_TYPE_PANORAMA && $this->PanoramaService->isOwn($item_source))) {
63 return new DataResponse($this->ShareService->create($item_type, $item_source, $type, $user));
64 } else {
65 return new DataResponse(false);
66 }
67 }
68
69 /**
70 * get all shares for a report

Callers

nothing calls this directly

Calls 1

isOwnMethod · 0.45

Tested by

no test coverage detected