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

Method getShares

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

174 * @throws Exception
175 */
176 public function getShares($item_type, $item_source)
177 {
178 $sql = $this->db->getQueryBuilder();
179 $sql->from(self::TABLE_NAME)
180 ->select('id', 'type', 'uid_owner', 'token', 'permissions', 'domain')
181 ->selectAlias('password', 'pass')
182 ->where($sql->expr()->eq('uid_initiator', $sql->createNamedParameter($this->userSession->getUser()->getUID())))
183 ->andWhere($sql->expr()->eq('item_type', $sql->createNamedParameter($item_type)))
184 ->andWhere($sql->expr()->eq('item_source', $sql->createNamedParameter($item_source)))
185 ->andWhere($sql->expr()->neq('type', $sql->createNamedParameter(2)))
186 ->orderBy('id', 'ASC');
187 $statement = $sql->executeQuery();
188 $result = $statement->fetchAll();
189 $statement->closeCursor();
190 return $result;
191 }
192
193 /**
194 * Get the all receivers of shares of a report

Callers

nothing calls this directly

Calls 3

eqMethod · 0.80
getUserMethod · 0.80
getUIDMethod · 0.45

Tested by

no test coverage detected