/**
  * @param Calendar $calendar
  *
  * @return Model;
  */
 public function entityToModel(Calendar $calendar)
 {
     $model = new Model();
     $model->setId($calendar->getId())->setTitle($calendar->getTitle())->setActive($calendar->isActive());
     if ($this->isModeFull()) {
         $model->setGoogleConnections($this->googleConnectionTransformer->entitiesToModel($calendar->getGoogleConnections()->toArray()));
     }
     return $model;
 }
 /**
  * @param Calendar $calendar
  *
  * @return Response
  *
  * @Route("/calendar/{id}", name="app_google_connections_list_calendar", methods="GET")
  * @Security("has_role('ROLE_CALD_GOOGL_SHOW')")
  */
 public function listByCalendarAction(Calendar $calendar)
 {
     return $this->render('googleConnections/listByCalendar.html.twig', ['googleConnections' => $calendar->getGoogleConnections(), 'calendar' => $calendar]);
 }