public function indexAction()
 {
     $mainLayout = $this->initializeAdminArea();
     $em = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');
     $id = $this->params()->fromRoute('id');
     $helper = new OperatoriControllerHelper();
     $partecipantiRecords = $helper->recoverWrapperRecords(new OperatoriAggiudicatariGetterWrapper(new OperatoriAggiudicatariGetter($em)), array('contrattoId' => $id));
     $partecipanti = $helper->formatPartecipanti($partecipantiRecords, 1);
     $aggiudicatari = $helper->formatPartecipanti($partecipantiRecords);
     $contrattoRecord = $helper->recoverWrapperRecords(new ContrattiPubbliciGetterWrapper(new ContrattiPubbliciGetter($em)), array('id' => $id, 'limit' => 1));
     $operatori = $helper->recoverWrapperRecords(new OperatoriGetterWrapper(new OperatoriGetter($em)), array('excludeId' => $helper->gatherPartecipantiId($partecipantiRecords)));
     $formGruppo = new OperatoriAggiudicatariGruppoForm();
     $formGruppo->addSubmitButton();
     $formRuolo = new OperatoriAggiudicatariRuoloForm();
     $formRuolo->addSubmitButton();
     $this->layout()->setVariables(array('contratto' => $contrattoRecord, 'operatori' => $operatori, 'formGruppo' => $formGruppo, 'formRuolo' => $formRuolo, 'operatoriPartecipanti' => $partecipanti, 'operatoriAggiudicatari' => $aggiudicatari, 'templatePartial' => 'contratti-pubblici/contratti-pubblici-aggiudicatari.phtml'));
     $this->layout()->setTemplate($mainLayout);
 }