| @@ 107-121 (lines=15) @@ | ||
| 104 | * @return Circle |
|
| 105 | * @throws CircleNotFoundException |
|
| 106 | */ |
|
| 107 | public function getItemFromRequest(CoreQueryBuilder $qb): Circle { |
|
| 108 | /** @var Circle $circle */ |
|
| 109 | try { |
|
| 110 | $circle = $qb->asItem( |
|
| 111 | Circle::class, |
|
| 112 | [ |
|
| 113 | 'local' => $this->configService->getLocalInstance() |
|
| 114 | ] |
|
| 115 | ); |
|
| 116 | } catch (RowNotFoundException $e) { |
|
| 117 | throw new CircleNotFoundException(); |
|
| 118 | } |
|
| 119 | ||
| 120 | return $circle; |
|
| 121 | } |
|
| 122 | ||
| 123 | /** |
|
| 124 | * @param CoreQueryBuilder $qb |
|
| @@ 107-121 (lines=15) @@ | ||
| 104 | * @return Member |
|
| 105 | * @throws MemberNotFoundException |
|
| 106 | */ |
|
| 107 | public function getItemFromRequest(CoreQueryBuilder $qb): Member { |
|
| 108 | /** @var Member $member */ |
|
| 109 | try { |
|
| 110 | $member = $qb->asItem( |
|
| 111 | Member::class, |
|
| 112 | [ |
|
| 113 | 'local' => $this->configService->getLocalInstance() |
|
| 114 | ] |
|
| 115 | ); |
|
| 116 | } catch (RowNotFoundException $e) { |
|
| 117 | throw new MemberNotFoundException(); |
|
| 118 | } |
|
| 119 | ||
| 120 | return $member; |
|
| 121 | } |
|
| 122 | ||
| 123 | /** |
|
| 124 | * @param CoreQueryBuilder $qb |
|