userId = $userId; $this->l10n = $l10n; $this->appConfig = $appConfig; } /** * @NoAdminRequired */ public function getSupportedMimes(){ return array( 'status' => 'success', 'mimes' => Filter::getAll() ); } /** * @NoCSRFRequired */ public function settingsIndex(){ return new TemplateResponse( $this->appName, 'settings', 'blank' ); } /** * @NoCSRFRequired */ public function adminIndex(){ return new TemplateResponse( $this->appName, 'admin', [ 'wopi_url' => $this->appConfig->getAppValue('wopi_url'), ], 'blank' ); } public function setSettings($wopi_url){ if (!is_null($wopi_url)){ $this->appConfig->setAppValue('wopi_url', $wopi_url); } $richMemCache = \OC::$server->getMemCacheFactory()->create('richdocuments'); $richMemCache->clear('discovery.xml'); $response = array( 'status' => 'success', 'data' => array('message' => (string) $this->l10n->t('Saved')) ); return $response; } }