‪TYPO3CMS  9.5
TYPO3\CMS\Filelist\FileFacade Class Reference

Public Member Functions

 __construct (FileInterface $resource)
 
string getIcon ()
 
TYPO3 CMS Core Resource FileInterface getResource ()
 
bool getIsEditable ()
 
bool getIsMetadataEditable ()
 
int getMetadataUid ()
 
string getName ()
 
string getPath ()
 
string null getPublicUrl ()
 
string getExtension ()
 
string getIdentifier ()
 
string getLastModified ()
 
string getSize ()
 
bool getIsReadable ()
 
bool getIsWritable ()
 
bool getIsReplaceable ()
 
bool getIsRenamable ()
 
bool isCopyable ()
 
bool isCuttable ()
 
bool getIsDeletable ()
 
bool isSelected ()
 
bool getIsImage ()
 
int getReferenceCount ()
 
mixed __call ($method, $arguments)
 

Protected Member Functions

TYPO3 CMS Core Authentication BackendUserAuthentication getBackendUser ()
 
TYPO3 CMS Core Localization LanguageService getLanguageService ()
 

Protected Attributes

TYPO3 CMS Core Resource FileInterface $resource
 
TYPO3 CMS Core Imaging IconFactory $iconFactory
 

Static Protected Attributes

static array $referenceCounts = array( )
 

Detailed Description

Class FileFacade

This class is meant to be a wrapper for Resource\File objects, which do not provide necessary methods needed in the views of the filelist extension. It is a first approach to get rid of the FileList class that mixes up PHP, HTML and JavaScript.

this is a concrete TYPO3 hook implementation and solely used for EXT:filelist and not part of TYPO3's Core API.

Definition at line 36 of file FileFacade.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Filelist\FileFacade::__construct ( FileInterface  $resource)
Parameters
\TYPO3\CMS\Core\Resource\FileInterface$resource

Do not use outside of EXT:filelist!

Definition at line 56 of file FileFacade.php.

References TYPO3\CMS\Filelist\FileFacade\$resource.

Member Function Documentation

◆ __call()

mixed TYPO3\CMS\Filelist\FileFacade::__call (   $method,
  $arguments 
)
Parameters
string$method
array$arguments
Returns
‪mixed

Definition at line 344 of file FileFacade.php.

◆ getBackendUser()

TYPO3 CMS Core Authentication BackendUserAuthentication TYPO3\CMS\Filelist\FileFacade::getBackendUser ( )
protected
Returns
‪\TYPO3\CMS\Core\Authentication\BackendUserAuthentication

Definition at line 356 of file FileFacade.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Filelist\FileFacade\getIsMetadataEditable().

◆ getExtension()

string TYPO3\CMS\Filelist\FileFacade::getExtension ( )
Returns
‪string

Definition at line 148 of file FileFacade.php.

Referenced by TYPO3\CMS\Filelist\FileFacade\getIsImage().

◆ getIcon()

string TYPO3\CMS\Filelist\FileFacade::getIcon ( )
Returns
‪string
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 66 of file FileFacade.php.

References TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

◆ getIdentifier()

string TYPO3\CMS\Filelist\FileFacade::getIdentifier ( )
Returns
‪string

Definition at line 156 of file FileFacade.php.

Referenced by TYPO3\CMS\Filelist\FileFacade\isSelected().

◆ getIsDeletable()

bool TYPO3\CMS\Filelist\FileFacade::getIsDeletable ( )
Returns
‪bool

Definition at line 258 of file FileFacade.php.

◆ getIsEditable()

bool TYPO3\CMS\Filelist\FileFacade::getIsEditable ( )
Returns
‪bool

Definition at line 84 of file FileFacade.php.

References $GLOBALS, and TYPO3\CMS\Filelist\FileFacade\getIsWritable().

◆ getIsImage()

bool TYPO3\CMS\Filelist\FileFacade::getIsImage ( )
Returns
‪bool

Definition at line 292 of file FileFacade.php.

References $GLOBALS, and TYPO3\CMS\Filelist\FileFacade\getExtension().

◆ getIsMetadataEditable()

bool TYPO3\CMS\Filelist\FileFacade::getIsMetadataEditable ( )

◆ getIsReadable()

bool TYPO3\CMS\Filelist\FileFacade::getIsReadable ( )
Returns
‪bool

Definition at line 180 of file FileFacade.php.

◆ getIsRenamable()

bool TYPO3\CMS\Filelist\FileFacade::getIsRenamable ( )
Returns
‪bool

Definition at line 219 of file FileFacade.php.

◆ getIsReplaceable()

bool TYPO3\CMS\Filelist\FileFacade::getIsReplaceable ( )
Returns
‪bool

Definition at line 206 of file FileFacade.php.

◆ getIsWritable()

bool TYPO3\CMS\Filelist\FileFacade::getIsWritable ( )

◆ getLanguageService()

TYPO3 CMS Core Localization LanguageService TYPO3\CMS\Filelist\FileFacade::getLanguageService ( )
protected
Returns
‪\TYPO3\CMS\Core\Localization\LanguageService

Definition at line 364 of file FileFacade.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Filelist\FileFacade\getSize().

◆ getLastModified()

string TYPO3\CMS\Filelist\FileFacade::getLastModified ( )
Returns
‪string

Definition at line 164 of file FileFacade.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\date().

◆ getMetadataUid()

int TYPO3\CMS\Filelist\FileFacade::getMetadataUid ( )
Returns
‪int

Definition at line 101 of file FileFacade.php.

◆ getName()

string TYPO3\CMS\Filelist\FileFacade::getName ( )
Returns
‪string

Definition at line 119 of file FileFacade.php.

◆ getPath()

string TYPO3\CMS\Filelist\FileFacade::getPath ( )
Returns
‪string

Definition at line 127 of file FileFacade.php.

◆ getPublicUrl()

string null TYPO3\CMS\Filelist\FileFacade::getPublicUrl ( )
Returns
‪string|null

Definition at line 140 of file FileFacade.php.

◆ getReferenceCount()

int TYPO3\CMS\Filelist\FileFacade::getReferenceCount ( )

Fetch, cache and return the number of references of a file

Returns
‪int

Definition at line 302 of file FileFacade.php.

◆ getResource()

TYPO3 CMS Core Resource FileInterface TYPO3\CMS\Filelist\FileFacade::getResource ( )
Returns
‪\TYPO3\CMS\Core\Resource\FileInterface

Definition at line 76 of file FileFacade.php.

References TYPO3\CMS\Filelist\FileFacade\$resource.

◆ getSize()

string TYPO3\CMS\Filelist\FileFacade::getSize ( )
Returns
‪string

Definition at line 172 of file FileFacade.php.

References TYPO3\CMS\Filelist\FileFacade\getLanguageService().

◆ isCopyable()

bool TYPO3\CMS\Filelist\FileFacade::isCopyable ( )
Returns
‪bool

Definition at line 232 of file FileFacade.php.

◆ isCuttable()

bool TYPO3\CMS\Filelist\FileFacade::isCuttable ( )
Returns
‪bool

Definition at line 245 of file FileFacade.php.

◆ isSelected()

bool TYPO3\CMS\Filelist\FileFacade::isSelected ( )
Returns
‪bool

Definition at line 271 of file FileFacade.php.

References TYPO3\CMS\Filelist\FileFacade\getIdentifier().

Member Data Documentation

◆ $iconFactory

TYPO3 CMS Core Imaging IconFactory TYPO3\CMS\Filelist\FileFacade::$iconFactory
protected

Definition at line 50 of file FileFacade.php.

◆ $referenceCounts

array TYPO3\CMS\Filelist\FileFacade::$referenceCounts = array( )
staticprotected

Cache to count the number of references for each file

Definition at line 42 of file FileFacade.php.

◆ $resource

TYPO3 CMS Core Resource FileInterface TYPO3\CMS\Filelist\FileFacade::$resource
protected