getDoctrine()->getRepository(Activity::class); } /** * The flyout to render recent activities and quick-start new recordings. * * @return Response */ public function recentActivitiesAction() { $user = $this->getUser(); // TODO make days configurable $activeEntries = $this->getRepository()->getRecentActivities($user, new \DateTime('-30 days')); return $this->render( 'navbar/recent-activities.html.twig', ['activities' => $activeEntries] ); } }