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

Method getAllSharedReports

lib/Db/ShareMapper.php:68–83  ·  view source on GitHub ↗

* get all shared reports * @return array * @throws Exception */

()

Source from the content-addressed store, hash-verified

66 * @throws Exception
67 */
68 public function getAllSharedReports()
69 {
70 $sql = $this->db->getQueryBuilder();
71 $sql->from(self::TABLE_NAME_REPORT, 'REPORT')
72 ->rightJoin('REPORT', self::TABLE_NAME, 'SHARE', $sql->expr()->eq('REPORT.id', 'SHARE.item_source'))
73 ->select('REPORT.*')
74 ->selectAlias('SHARE.id', 'shareId')
75 ->selectAlias('SHARE.type', 'shareType')
76 ->selectAlias('SHARE.uid_owner', 'shareUid_owner')
77 ->addSelect('SHARE.permissions')
78 ->where($sql->expr()->eq('SHARE.item_type', $sql->createNamedParameter('report')));
79 $statement = $sql->executeQuery();
80 $result = $statement->fetchAll();
81 $statement->closeCursor();
82 return $result;
83 }
84
85 /**
86 * get all shared panoramas

Callers 1

getSharedItemsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected