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

Method getShares

lib/Db/ShareMapper.php:164–179  ·  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

162 * @throws Exception
163 */
164 public function getShares($item_type, $item_source)
165 {
166 $sql = $this->db->getQueryBuilder();
167 $sql->from(self::TABLE_NAME)
168 ->select('id', 'type', 'uid_owner', 'token', 'permissions', 'domain')
169 ->selectAlias('password', 'pass')
170 ->where($sql->expr()->eq('uid_initiator', $sql->createNamedParameter($this->userSession->getUser()->getUID())))
171 ->andWhere($sql->expr()->eq('item_type', $sql->createNamedParameter($item_type)))
172 ->andWhere($sql->expr()->eq('item_source', $sql->createNamedParameter($item_source)))
173 ->andWhere($sql->expr()->neq('type', $sql->createNamedParameter(2)))
174 ->orderBy('id', 'ASC');
175 $statement = $sql->executeQuery();
176 $result = $statement->fetchAll();
177 $statement->closeCursor();
178 return $result;
179 }
180
181 /**
182 * 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