/**
  * Generate the module
  */
 protected function compile()
 {
     global $objPage;
     //Prüfen ob eine numerische ExposeId angegeben wurde
     $exposeId = \Input::get("object");
     if ($exposeId == '' || !preg_match('/^\\d+$/', $exposeId)) {
         $this->redirectToNotFound($objPage);
     }
     //Get Object request Page
     if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) !== null) {
         $this->_objTarget = $objTarget;
     }
     $objImmoConnector = new ImmoConnector('is24', \Config::get('gloImmoConnectorKey'), \Config::get('gloImmoConnectorSecret'));
     //User auf null setzen bzw. Username auslesen
     $objUser = \IcAuthModel::findByPk($this->gloImmoConnectorUser);
     if (is_null($objUser)) {
         throw new \Exception("Missing or invalid User selected for API-Connection", 1);
     }
     //Expose laden
     $objExpose = $objImmoConnector->getExpose($exposeId, $objUser);
     $objAttachment = $objImmoConnector->getAttachment($exposeId);
     $xmlExpose = simplexml_import_dom($objExpose);
     //Typ der Immobilie bestimmen
     $strType = $this->getObjectType($objExpose);
     $strId = $this->getObjectId($objExpose);
     //Template je nach Typ setzen
     $this->Template = new \FrontendTemplate($this->getTemplateName($strType));
     //XML-Daten für Objekttyp aufbereiten
     //$arrData = $this->getDataForType($strType, $objExpose);
     //Objektdaten dem Template zuweisen
     $this->Template->gloImmoConnectorRemoveTitleText = $this->gloImmoConnectorRemoveTitleText;
     $this->Template->expose = $xmlExpose;
     $this->Template->attachment = $this->getAttachments($objAttachment);
     $this->Template->objectRequest = array('action' => $this->generateFrontendUrl($this->_objTarget->row()), 'exposeId' => $strId, 'exposeUrl' => \Environment::get('uri'), 'exposeTitle' => htmlspecialchars((string) $xmlExpose->title));
 }