PHP Class Jarves\Controller\Admin\FileController

Inheritance: extends Symfony\Bundle\FrameworkBundle\Controller\Controller
Afficher le fichier Open project: jarves/jarves

Protected Properties

Свойство Type Description
$acl Jarves\ACL
$jarves Jarves\Jarves
$objects Jarves\Objects
$pageStack Jarves\PageStack
$utils Jarves\Utils
$webFilesystem Jarves\Filesystem\WebFilesystem

Méthodes publiques

Méthode Description
createFileAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : boolean
createFolderAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : boolean
deleteFileAction ( string $path ) : boolean
doUploadAction ( Request $request, FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : string
getContentAction ( string $path ) : array | null | string
getFileAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : array | null
moveFileAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : array | boolean
pasteAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : array | boolean
prepareUploadAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : array[renamed
searchAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : array
setContainer ( Symfony\Component\DependencyInjection\ContainerInterface $container = null )
setContentAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : boolean
showImageAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : Response
showPreviewAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : Response
viewFileAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher )

Méthodes protégées

Méthode Description
appendImageInformation ( array &$file ) Adds image information (dimensions/imageType).
checkAccess ( string $path, integer $mode = ACL::MODE_UPDATE )
checkOrThrow ( ACLRequest $aclRequest )
getFile ( string | integer $path ) : array | null Returns file information as array.
getFiles ( string $path ) : array | null Returns a list of files for a folder.
newFeed ( string | File $path, string $verb, string $message = '' )
prepareFiles ( FileInfo[] $files, boolean $showHiddenFiles = false ) : array Adds 'writeAccess' and imageInformation to $files.

Method Details

appendImageInformation() protected méthode

Adds image information (dimensions/imageType).
protected appendImageInformation ( array &$file )
$file array

checkAccess() protected méthode

protected checkAccess ( string $path, integer $mode = ACL::MODE_UPDATE )
$path string
$mode integer

checkOrThrow() protected méthode

protected checkOrThrow ( ACLRequest $aclRequest )
$aclRequest Jarves\ACLRequest

createFileAction() public méthode

public createFileAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : boolean
$paramFetcher FOS\RestBundle\Request\ParamFetcher
Résultat boolean

createFolderAction() public méthode

public createFolderAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : boolean
$paramFetcher FOS\RestBundle\Request\ParamFetcher
Résultat boolean

deleteFileAction() public méthode

public deleteFileAction ( string $path ) : boolean
$path string
Résultat boolean

doUploadAction() public méthode

public doUploadAction ( Request $request, FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : string
$request Symfony\Component\HttpFoundation\Request
$paramFetcher FOS\RestBundle\Request\ParamFetcher
Résultat string

getContentAction() public méthode

public getContentAction ( string $path ) : array | null | string
$path string
Résultat array | null | string array for directory, string for file content, null if not found.

getFile() protected méthode

Returns file information as array.
protected getFile ( string | integer $path ) : array | null
$path string | integer
Résultat array | null

getFileAction() public méthode

public getFileAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : array | null
$paramFetcher FOS\RestBundle\Request\ParamFetcher
Résultat array | null null if not found or not access

getFiles() protected méthode

Returns a list of files for a folder.
protected getFiles ( string $path ) : array | null
$path string
Résultat array | null

moveFileAction() public méthode

public moveFileAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : array | boolean
$paramFetcher FOS\RestBundle\Request\ParamFetcher
Résultat array | boolean returns [targetExists => true] when the target exists and $overwrite=false, otherwise true/false.

newFeed() protected méthode

protected newFeed ( string | File $path, string $verb, string $message = '' )
$path string | Jarves\Model\File
$verb string
$message string

pasteAction() public méthode

public pasteAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : array | boolean
$paramFetcher FOS\RestBundle\Request\ParamFetcher
Résultat array | boolean returns [targetExists => true] when a target exists and $overwrite=false, otherwise true/false.

prepareFiles() protected méthode

Adds 'writeAccess' and imageInformation to $files.
protected prepareFiles ( FileInfo[] $files, boolean $showHiddenFiles = false ) : array
$files Jarves\File\FileInfo[]
$showHiddenFiles boolean
Résultat array

prepareUploadAction() public méthode

public prepareUploadAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : array[renamed
$paramFetcher FOS\RestBundle\Request\ParamFetcher
Résultat array[renamed

searchAction() public méthode

public searchAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : array
$paramFetcher FOS\RestBundle\Request\ParamFetcher
Résultat array

setContainer() public méthode

public setContainer ( Symfony\Component\DependencyInjection\ContainerInterface $container = null )
$container Symfony\Component\DependencyInjection\ContainerInterface

setContentAction() public méthode

public setContentAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : boolean
$paramFetcher FOS\RestBundle\Request\ParamFetcher
Résultat boolean

showImageAction() public méthode

public showImageAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : Response
$paramFetcher FOS\RestBundle\Request\ParamFetcher
Résultat Symfony\Component\HttpFoundation\Response

showPreviewAction() public méthode

public showPreviewAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : Response
$paramFetcher FOS\RestBundle\Request\ParamFetcher
Résultat Symfony\Component\HttpFoundation\Response

viewFileAction() public méthode

public viewFileAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher )
$paramFetcher FOS\RestBundle\Request\ParamFetcher

Property Details

$acl protected_oe property

protected ACL,Jarves $acl
Résultat Jarves\ACL

$jarves protected_oe property

protected Jarves,Jarves $jarves
Résultat Jarves\Jarves

$objects protected_oe property

protected Objects,Jarves $objects
Résultat Jarves\Objects

$pageStack protected_oe property

protected PageStack,Jarves $pageStack
Résultat Jarves\PageStack

$utils protected_oe property

protected Utils,Jarves $utils
Résultat Jarves\Utils

$webFilesystem protected_oe property

protected WebFilesystem,Jarves\Filesystem $webFilesystem
Résultat Jarves\Filesystem\WebFilesystem