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

Method getShares

lib/Db/ShareMapper.php:161–176  ·  view source on GitHub ↗

* Get all shares of a report * @param $item_type * @param $item_source * @return array * @throws Exception */

($item_type, $item_source)

Source from the content-addressed store, hash-verified

159 * @throws Exception
160 */
161 public function getShares($item_type, $item_source)
162 {
163 $sql = $this->db->getQueryBuilder();
164 $sql->from(self::TABLE_NAME)
165 ->select('id', 'type', 'uid_owner', 'token', 'permissions', 'domain')
166 ->selectAlias('password', 'pass')
167 ->where($sql->expr()->eq('uid_initiator', $sql->createNamedParameter($this->userSession->getUser()->getUID())))
168 ->andWhere($sql->expr()->eq('item_type', $sql->createNamedParameter($item_type)))
169 ->andWhere($sql->expr()->eq('item_source', $sql->createNamedParameter($item_source)))
170 ->andWhere($sql->expr()->neq('type', $sql->createNamedParameter(2)))
171 ->orderBy('id', 'ASC');
172 $statement = $sql->executeQuery();
173 $result = $statement->fetchAll();
174 $statement->closeCursor();
175 return $result;
176 }
177
178 /**
179 * Get the all receivers of shares of a report

Callers

nothing calls this directly

Calls 1

getUIDMethod · 0.45

Tested by

no test coverage detected