public function getRenderOptions(Form $form)
    {
        $file_manager = $this->getFileManager();
        $dir_files = scandir($file_manager->getDir());
        $root_dirs = scandir($file_manager->getUploadPath());
        $is_popup = $this->container->get('request')->get('popup') ? true : false;

        $options['files'] = $this->getFiles($dir_files);
        $options['file_body_display'] = $file_manager->getDisplayType();
        $options['dirs'] = $this->getDirectoryTree($root_dirs, $file_manager->getUploadPath(), "");
        $options['isPopup'] = $is_popup;
        $options['copy_file'] = $this->container->get('session')->get('copy');
        $options['form'] = $form->createView();
        $options['copy_type'] = FileManager::FILE_COPY;
        $options['cut_type'] = FileManager::FILE_CUT;
        $options['root_folder'] = $file_manager->getPath();
        $options['current_path'] = $file_manager->getDirPath();
        $options['upload_allow'] = $file_manager->getExtensionsAllowed();
        $options['usages'] = $file_manager->getUsagesClass();
        $options['theme_css'] = $file_manager->getThemeCss();

        return $options;
    }