getNavigationManager()->setActiveEntry($this->appName); $importManager = new ImportManager(); $imppTypes = Properties::getTypesForProperty('IMPP'); $adrTypes = Properties::getTypesForProperty('ADR'); $phoneTypes = Properties::getTypesForProperty('TEL'); $emailTypes = Properties::getTypesForProperty('EMAIL'); $ims = Properties::getIMOptions(); $imProtocols = array(); foreach($ims as $name => $values) { $imProtocols[$name] = $values['displayname']; } $maxUploadFilesize = \OCP\Util::maxUploadFilesize('/'); $response = new TemplateResponse($this->appName, 'contacts'); $response->setParams(array( 'uploadMaxFilesize' => $maxUploadFilesize, 'uploadMaxHumanFilesize' => \OCP\Util::humanFileSize($maxUploadFilesize), 'phoneTypes' => $phoneTypes, 'emailTypes' => $emailTypes, 'adrTypes' => $adrTypes, 'imppTypes' => $imppTypes, 'imProtocols' => $imProtocols, 'importManager' => $importManager, )); return $response; } }