use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use OCP\Files\Folder;
use OCP\App\IAppManager;
+use Symfony\Component\EventDispatcher\GenericEvent;
/**
* Class ViewController
$contentItems[] = $contentItem;
}
- $this->eventDispatcher->dispatch('OCA\Files::loadAdditionalScripts');
+ $event = new GenericEvent(null, ['hiddenFields' => []]);
+ $this->eventDispatcher->dispatch('OCA\Files::loadAdditionalScripts', $event);
$params = [];
$params['usedSpacePercent'] = (int)$storageInfo['relative'];
$params['fileNotFound'] = $fileNotFound ? 1 : 0;
$params['appNavigation'] = $nav;
$params['appContents'] = $contentItems;
+ $params['hiddenFields'] = $event->getArgument('hiddenFields');
$response = new TemplateResponse(
$this->appName,
<input type="hidden" name="defaultFileSortingDirection" id="defaultFileSortingDirection" value="<?php p($_['defaultFileSortingDirection']) ?>" />
<input type="hidden" name="showHiddenFiles" id="showHiddenFiles" value="<?php p($_['showHiddenFiles']); ?>" />
<?php endif;
+
+foreach ($_['hiddenFields'] as $name => $value) {?>
+<input type="hidden" name="<?php p($name) ?>" id="<?php p($name) ?>" value="<?php p($value) ?>" />
+<?php }