src/Charcoal/Admin/Action/ElfinderConnectorAction.php
public function getNamedRoot($ident)
    {
        if ($this->hasFilesystem($ident) === false) {
            return null;
        }

        $filesystem = $this->getFilesystem($ident);
        $fsConfig   = $this->getFilesystemConfig($ident);
        $elfConfig  = $this->getFilesystemAdminConfig($ident);

        if (isset($elfConfig['label'])) {
            $label = $elfConfig['label'];
        } elseif (isset($fsConfig['label'])) {
            $label = $fsConfig['label'];
        } else {
            $label = 'filesystem.disk.'.$ident;
        }

        $immutableSettings = [
            'filesystem'  => $filesystem,
            'alias'       => $this->translator()->translate($label),
        ];

        $root = array_replace_recursive(
            $this->getDefaultElfinderRootSettings(),
            $this->getDefaultFlysystemRootSettings(),
            $elfConfig
        );

        $root = array_replace_recursive(
            $this->resolveFallbackRootSettings($ident),
            $root,
            $immutableSettings
        );

        return $this->resolveCallbacksForRoot($root);
    }
public function getNamedRoot($ident)
    {
        if ($this->hasFilesystem($ident) === false) {
            return null;
        }

        $filesystem = $this->getFilesystem($ident);
        $fsConfig   = $this->getFilesystemConfig($ident);
        $elfConfig  = $this->getFilesystemAdminConfig($ident);

        if (isset($elfConfig['label'])) {
            $label = $elfConfig['label'];
        } elseif (isset($fsConfig['label'])) {
            $label = $fsConfig['label'];
        } else {
            $label = 'filesystem.disk.'.$ident;
        }

        $immutableSettings = [
            'filesystem'  => $filesystem,
            'alias'       => $this->translator()->translate($label),
        ];

        $root = array_replace_recursive(
            $this->getDefaultElfinderRootSettings(),
            $this->getDefaultFlysystemRootSettings(),
            $elfConfig
        );

        $root = array_replace_recursive(
            $this->resolveFallbackRootSettings($ident),
            $root,
            $immutableSettings
        );

        return $this->resolveCallbacksForRoot($root);
    }
public function getNamedRoot ( $ ident ) { if ( $ this -> hasFilesystem ( $ ident ) === false ) { return null ; } $ filesystem = $ this -> getFilesystem ( $ ident ) ; $ fsConfig = $ this -> getFilesystemConfig ( $ ident ) ; $ elfConfig = $ this -> getFilesystemAdminConfig ( $ ident ) ; if ( isset ( $ elfConfig [ 'label' ] ) ) { $ label = $ elfConfig [ 'label' ] ; } elseif ( isset ( $ fsConfig [ 'label' ] ) ) { $ label = $ fsConfig [ 'label' ] ; } else { $ label = 'filesystem.disk.' . $ ident ; } $ immutableSettings = [ 'filesystem' => $ filesystem , 'alias' => $ this -> translator ( ) -> translate ( $ label ) , ] ; $ root = array_replace_recursive ( $ this -> getDefaultElfinderRootSettings ( ) , $ this -> getDefaultFlysystemRootSettings ( ) , $ elfConfig ) ; $ root = array_replace_recursive ( $ this -> resolveFallbackRootSettings ( $ ident ) , $ root , $ immutableSettings ) ; return $ this -> resolveCallbacksForRoot ( $ root ) ; }
Retrieve the elFinder root options for the given file system.

Merges `config.filesystem.connections` with
{@see self::getDefaultDiskSettings() default root settings}.

@param  string $ident The disk identifier.
@return array|null Returns an elFinder root structure or NULL.
Retrieve the elFinder root options for the given file system .