* get reports * @return array * @throws Exception */
()
| 40 | * @throws Exception |
| 41 | */ |
| 42 | public function index() |
| 43 | { |
| 44 | $sql = $this->db->getQueryBuilder(); |
| 45 | $sql->from(self::TABLE_NAME) |
| 46 | ->select('*') |
| 47 | ->where($sql->expr()->eq('user_id', $sql->createNamedParameter($this->userId))) |
| 48 | ->orderBy('parent', 'ASC') |
| 49 | ->addOrderBy('name', 'ASC'); |
| 50 | $statement = $sql->executeQuery(); |
| 51 | $result = $statement->fetchAll(); |
| 52 | $statement->closeCursor(); |
| 53 | |
| 54 | return $result; |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * get reports for user |