src/Charcoal/Admin/Action/ElfinderConnectorAction.php
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;
    }
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;
    }
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 ; }
Setup the elFinder connector.

@param  array|null $extraOptions Additional settings to pass to elFinder.
@return elFinderConnector
Setup the elFinder connector .