public function setupElfinder(array $extraOptions = [])
    {
        if (!defined('ELFINDER_IMG_PARENT_URL')) {
            // Ensure images injected by elFinder are relative to its assets directory
            define('ELFINDER_IMG_PARENT_URL', $this->baseUrl(ElfinderTemplate::ELFINDER_ASSETS_REL_PATH));
        }

        $options = $this->buildConnectorOptions($extraOptions);

        // Run elFinder
        $connector = new elFinderConnector(new elFinder($options));
        $connector->run();

        return $connector;
    }