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

Method deleteSharesByItem

lib/Db/ShareMapper.php:279–288  ·  view source on GitHub ↗

* Delete all shares of a report * Used during report deletion * @param $item_type * @param $item_source * @return bool * @throws Exception */

($item_type, $item_source)

Source from the content-addressed store, hash-verified

277 * @throws Exception
278 */
279 public function deleteSharesByItem($item_type, $item_source)
280 {
281 $sql = $this->db->getQueryBuilder();
282 $sql->select('id', 'item_type', 'item_source', 'type', 'uid_owner', 'uid_initiator')
283 ->from(self::TABLE_NAME)
284 ->where($sql->expr()->eq('item_type', $sql->createNamedParameter($item_type)))
285 ->andWhere($sql->expr()->eq('item_source', $sql->createNamedParameter($item_source)));
286 $this->deleteAuditedShares($sql);
287 return true;
288 }
289
290 /**
291 * delete all shares when a share-receiving-user is deleted

Callers 1

share-audit.phpFile · 0.45

Calls 2

deleteAuditedSharesMethod · 0.95
eqMethod · 0.80

Tested by

no test coverage detected