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

Method getReportsByGroup

lib/Db/ReportMapper.php:394–414  ·  view source on GitHub ↗

* get reports by group * @param $groupId * @return array * @throws Exception */

($groupId)

Source from the content-addressed store, hash-verified

392 * @throws Exception
393 */
394 public function getReportsByGroup($groupId)
395 {
396 $sql = $this->db->getQueryBuilder();
397 $sql->from(self::TABLE_NAME)
398 ->select('*')
399 ->where($sql->expr()->eq('parent', $sql->createNamedParameter($groupId)));
400 $statement = $sql->executeQuery();
401 $result = $statement->fetchAll();
402 $statement->closeCursor();
403
404 if ($result !== false && is_array($result)) {
405 foreach ($result as &$row) {
406 $row['dataset'] = (int) $row['dataset'];
407 $row['type'] = (int) $row['type'];
408 $row['parent'] = (int) $row['parent'];
409 }
410 unset($row); // Unset reference
411 }
412
413 return $result;
414 }
415
416 /**
417 * reports for a dataset

Callers 1

getSharedItemsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected