TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
FileLinkHandler Class Reference
Inheritance diagram for FileLinkHandler:
AbstractLinkHandler LinkHandlerInterface LinkParameterProviderInterface FolderLinkHandler

Public Member Functions

 canHandleLink (array $linkParts)
 
 formatCurrentUrl ()
 
 expandFolder (Folder $folder, $extensionList= '')
 
 getBodyTagAttributes ()
 
 getUrlParameters (array $values)
 
 isCurrentlySelectedItem (array $values)
 
 getScriptUrl ()
 

Protected Member Functions

 renderItem (ResourceInterface $fileOrFolderObject)
 
 getSelectedFolder ($folderIdentifier= '')
 

Protected Attributes

 $linkParts = []
 
 $expectedClass = File::class
 
 $mode = 'file'
 
 $expandFolder
 

Detailed Description

Link handler for files

Definition at line 35 of file recordlist/Classes/LinkHandler/FileLinkHandler.php.

Member Function Documentation

canHandleLink ( array  $linkParts)

Checks if this is the handler for the given link

The handler may store this information locally for later usage.

Parameters
array$linkPartsLink parts as returned from TypoLinkCodecService
Returns
bool

Implements LinkHandlerInterface.

Definition at line 68 of file recordlist/Classes/LinkHandler/FileLinkHandler.php.

References FileLinkHandler\$linkParts.

expandFolder ( Folder  $folder,
  $extensionList = '' 
)

For RTE: This displays all files from folder. No thumbnails shown

Parameters
Folder$folderThe folder path to expand
string$extensionListList of file extensions to show
Returns
string HTML output

Definition at line 151 of file recordlist/Classes/LinkHandler/FileLinkHandler.php.

References AbstractLinkHandler\getBackendUser(), Folder\getIdentifier(), FileLinkHandler\renderItem(), and Icon\SIZE_SMALL.

formatCurrentUrl ( )

Format the current link for HTML output

Returns
string

Implements LinkHandlerInterface.

Definition at line 85 of file recordlist/Classes/LinkHandler/FileLinkHandler.php.

References FileLinkHandler\$mode.

getBodyTagAttributes ( )
Returns
string[] Array of body-tag attributes

Implements LinkHandlerInterface.

Definition at line 223 of file recordlist/Classes/LinkHandler/FileLinkHandler.php.

References GeneralUtility\makeInstance(), and LinkService\TYPE_FILE.

getScriptUrl ( )

Returns the URL of the current script

Returns
string

Implements LinkParameterProviderInterface.

Definition at line 258 of file recordlist/Classes/LinkHandler/FileLinkHandler.php.

getSelectedFolder (   $folderIdentifier = '')
protected

Returns the currently selected folder, or th default upload folder

Parameters
string$folderIdentifier
Returns
mixed the folder object or false if nothing was found

Definition at line 269 of file recordlist/Classes/LinkHandler/FileLinkHandler.php.

References AbstractLinkHandler\getBackendUser(), and ResourceFactory\getInstance().

getUrlParameters ( array  $values)
Parameters
array$valuesArray of values to include into the parameters or which might influence the parameters
Returns
string[] Array of parameters which have to be added to URLs

Implements LinkParameterProviderInterface.

Definition at line 235 of file recordlist/Classes/LinkHandler/FileLinkHandler.php.

References FileLinkHandler\$expandFolder.

isCurrentlySelectedItem ( array  $values)
Parameters
array$valuesValues to be checked
Returns
bool Returns TRUE if the given values match the currently selected item

Implements LinkParameterProviderInterface.

Definition at line 248 of file recordlist/Classes/LinkHandler/FileLinkHandler.php.

renderItem ( ResourceInterface  $fileOrFolderObject)
protected

Renders a single item displayed in the current folder

Parameters
ResourceInterface$fileOrFolderObject
Returns
array
Exceptions
InvalidArgumentException

Definition at line 199 of file recordlist/Classes/LinkHandler/FileLinkHandler.php.

References GeneralUtility\formatSize(), AbstractLinkHandler\getBackendUser(), AbstractLinkHandler\getLanguageService(), ResourceInterface\getName(), GeneralUtility\makeInstance(), Icon\SIZE_SMALL, and LinkService\TYPE_FILE.

Referenced by FileLinkHandler\expandFolder().

Member Data Documentation

$expectedClass = File::class
protected
$linkParts = []
protected
$mode = 'file'
protected