src/Charcoal/Admin/Action/ElfinderConnectorAction.php
public function getCurrentRoots()
    {
        $formProperty     = $this->formProperty();
        $targetFilesystem = $formProperty ? $formProperty->filesystem() : null;

        if ($this->hasFilesystem($targetFilesystem)) {
            $disk = $this->getNamedRoot($targetFilesystem);

            $startPath = $formProperty->uploadPath();
            $isPublic = $formProperty->publicAccess();
            $basePath = $isPublic ? $this->publicPath : $this->basePath;

            if (!file_exists($basePath.$startPath)) {
                mkdir($basePath.$startPath, 0755, true);
            }

            if ($startPath) {
                $disk['startPath'] = $startPath;
            }

            return [ $disk ];
        }

        return $this->getPublicRoots();
    }
public function getCurrentRoots()
    {
        $formProperty     = $this->formProperty();
        $targetFilesystem = $formProperty ? $formProperty->filesystem() : null;

        if ($this->hasFilesystem($targetFilesystem)) {
            $disk = $this->getNamedRoot($targetFilesystem);

            $startPath = $formProperty->uploadPath();
            $isPublic = $formProperty->publicAccess();
            $basePath = $isPublic ? $this->publicPath : $this->basePath;

            if (!file_exists($basePath.$startPath)) {
                mkdir($basePath.$startPath, 0755, true);
            }

            if ($startPath) {
                $disk['startPath'] = $startPath;
            }

            return [ $disk ];
        }

        return $this->getPublicRoots();
    }
public function getCurrentRoots ( ) { $ formProperty = $ this -> formProperty ( ) ; $ targetFilesystem = $ formProperty ? $ formProperty -> filesystem ( ) : null ; if ( $ this -> hasFilesystem ( $ targetFilesystem ) ) { $ disk = $ this -> getNamedRoot ( $ targetFilesystem ) ; $ startPath = $ formProperty -> uploadPath ( ) ; $ isPublic = $ formProperty -> publicAccess ( ) ; $ basePath = $ isPublic ? $ this -> publicPath : $ this -> basePath ; if ( ! file_exists ( $ basePath . $ startPath ) ) { mkdir ( $ basePath . $ startPath , 0755 , true ) ; } if ( $ startPath ) { $ disk [ 'startPath' ] = $ startPath ; } return [ $ disk ] ; } return $ this -> getPublicRoots ( ) ; }
Retrieve only the current context's elFinder root volumes.

@return array Returns all public root volumes
or a subset if the context has a related form property.
Retrieve only the current context s elFinder root volumes .