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

Method getSharedReport

lib/Service/ShareService.php:234–242  ·  view source on GitHub ↗

* get metadata of a report, shared with current user * used to check if user is allowed to execute current report * * @param $reportId * @return array * @throws Exception */

($reportId)

Source from the content-addressed store, hash-verified

232 * @throws Exception
233 */
234 public function getSharedReport($reportId) {
235 $sharedReport = $this->getSharedItems(self::SHARE_ITEM_TYPE_REPORT);
236 if (in_array($reportId, array_column($sharedReport, "id"))) {
237 $key = array_search($reportId, array_column($sharedReport, 'id'));
238 return $sharedReport[$key];
239 } else {
240 return [];
241 }
242 }
243
244 /**
245 * get metadata of a report, shared with current user as part of a panorama

Callers 1

readMethod · 0.80

Calls 1

getSharedItemsMethod · 0.95

Tested by

no test coverage detected