‪TYPO3CMS  10.4
TYPO3\CMS\Form\Slot\FilePersistenceSlot Class Reference
Inheritance diagram for TYPO3\CMS\Form\Slot\FilePersistenceSlot:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

string getContentSignature (string $content)
 
 defineInvocation (string $command, bool $type=null)
 
bool allowInvocation (string $command, string $combinedFileIdentifier, string $contentSignature=null)
 
 onPreFileCreate (BeforeFileCreatedEvent $event)
 
 onPreFileAdd (BeforeFileAddedEvent $event)
 
 onPreFileRename (BeforeFileRenamedEvent $event)
 
 onPreFileReplace (BeforeFileReplacedEvent $event)
 
 onPreFileMove (BeforeFileMovedEvent $event)
 
 onPreFileSetContents (BeforeFileContentsSetEvent $event)
 

Public Attributes

const COMMAND_FILE_ADD = 'fileAdd'
 
const COMMAND_FILE_CREATE = 'fileCreate'
 
const COMMAND_FILE_MOVE = 'fileMove'
 
const COMMAND_FILE_RENAME = 'fileRename'
 
const COMMAND_FILE_REPLACE = 'fileReplace'
 
const COMMAND_FILE_SET_CONTENTS = 'fileSetContents'
 

Protected Member Functions

 assertFileName (string $command, string $combinedFileIdentifier, string $content=null)
 
int null searchAllowedInvocation (string $command, string $combinedFileIdentifier, string $contentSignature=null)
 
string buildCombinedIdentifier (FolderInterface $folder, string $fileName)
 
bool isFormDefinition (string $identifier)
 
bool isRecycleFolder (FolderInterface $folder)
 

Protected Attributes

array $definedInvocations = array( )
 
array $allowedInvocations = array( )
 

Detailed Description

A PSR-14 event listener for various FAL related functionality.

will be renamed at some point.

Definition at line 37 of file FilePersistenceSlot.php.

Member Function Documentation

◆ allowInvocation()

bool TYPO3\CMS\Form\Slot\FilePersistenceSlot::allowInvocation ( string  $command,
string  $combinedFileIdentifier,
string  $contentSignature = null 
)

Allows invocation for a particular combination of command and file identifier. Commands providing new content have have to submit a HMAC signature on the content as well.

Parameters
string$command
string$combinedFileIdentifier
string$contentSignature
Returns
‪bool
See also
getContentSignature

Definition at line 92 of file FilePersistenceSlot.php.

References TYPO3\CMS\Form\Slot\FilePersistenceSlot\searchAllowedInvocation().

◆ assertFileName()

◆ buildCombinedIdentifier()

◆ defineInvocation()

TYPO3\CMS\Form\Slot\FilePersistenceSlot::defineInvocation ( string  $command,
bool  $type = null 
)

Defines invocations on command level only depending on the type:

  • ‪true: whitelist command, takes precedence over $allowedInvocations
  • ‪false: blacklist command, takes precedence over $allowedInvocations
  • ‪removes previously definition for particular command
Parameters
string$command
bool | null$type

Definition at line 73 of file FilePersistenceSlot.php.

◆ getContentSignature()

string TYPO3\CMS\Form\Slot\FilePersistenceSlot::getContentSignature ( string  $content)
Parameters
string$content
Returns
‪string

Definition at line 58 of file FilePersistenceSlot.php.

Referenced by TYPO3\CMS\Form\Slot\FilePersistenceSlot\assertFileName().

◆ isFormDefinition()

bool TYPO3\CMS\Form\Slot\FilePersistenceSlot::isFormDefinition ( string  $identifier)
protected

◆ isRecycleFolder()

bool TYPO3\CMS\Form\Slot\FilePersistenceSlot::isRecycleFolder ( FolderInterface  $folder)
protected

◆ onPreFileAdd()

◆ onPreFileCreate()

◆ onPreFileMove()

◆ onPreFileRename()

◆ onPreFileReplace()

◆ onPreFileSetContents()

◆ searchAllowedInvocation()

int null TYPO3\CMS\Form\Slot\FilePersistenceSlot::searchAllowedInvocation ( string  $command,
string  $combinedFileIdentifier,
string  $contentSignature = null 
)
protected
Parameters
string$command
string$combinedFileIdentifier
string | null$contentSignature
Returns
‪int|null

Definition at line 270 of file FilePersistenceSlot.php.

Referenced by TYPO3\CMS\Form\Slot\FilePersistenceSlot\allowInvocation(), and TYPO3\CMS\Form\Slot\FilePersistenceSlot\assertFileName().

Member Data Documentation

◆ $allowedInvocations

array TYPO3\CMS\Form\Slot\FilePersistenceSlot::$allowedInvocations = array( )
protected

Definition at line 52 of file FilePersistenceSlot.php.

◆ $definedInvocations

array TYPO3\CMS\Form\Slot\FilePersistenceSlot::$definedInvocations = array( )
protected

Definition at line 48 of file FilePersistenceSlot.php.

◆ COMMAND_FILE_ADD

const TYPO3\CMS\Form\Slot\FilePersistenceSlot::COMMAND_FILE_ADD = 'fileAdd'

◆ COMMAND_FILE_CREATE

const TYPO3\CMS\Form\Slot\FilePersistenceSlot::COMMAND_FILE_CREATE = 'fileCreate'

◆ COMMAND_FILE_MOVE

const TYPO3\CMS\Form\Slot\FilePersistenceSlot::COMMAND_FILE_MOVE = 'fileMove'

Definition at line 41 of file FilePersistenceSlot.php.

◆ COMMAND_FILE_RENAME

const TYPO3\CMS\Form\Slot\FilePersistenceSlot::COMMAND_FILE_RENAME = 'fileRename'

◆ COMMAND_FILE_REPLACE

const TYPO3\CMS\Form\Slot\FilePersistenceSlot::COMMAND_FILE_REPLACE = 'fileReplace'

Definition at line 43 of file FilePersistenceSlot.php.

◆ COMMAND_FILE_SET_CONTENTS

const TYPO3\CMS\Form\Slot\FilePersistenceSlot::COMMAND_FILE_SET_CONTENTS = 'fileSetContents'