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

Public Member Functions

 __construct (private readonly HashService $hashService)
 
 getContentSignature (string $content)
 
 defineInvocation (string $command, bool $type=null)
 
 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)
 
 searchAllowedInvocation (string $command, string $combinedFileIdentifier, string $contentSignature=null)
 
 buildCombinedIdentifier (FolderInterface $folder, string $fileName)
 
 isFormDefinition (string $identifier)
 
 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.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Form\Slot\FilePersistenceSlot::__construct ( private readonly HashService  $hashService)

Definition at line 54 of file FilePersistenceSlot.php.

Member Function Documentation

◆ allowInvocation()

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.

See also
getContentSignature

Definition at line 86 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 71 of file FilePersistenceSlot.php.

◆ getContentSignature()

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

◆ isFormDefinition()

◆ isRecycleFolder()

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

◆ onPreFileAdd()

◆ onPreFileCreate()

◆ onPreFileMove()

◆ onPreFileRename()

◆ onPreFileReplace()

◆ onPreFileSetContents()

◆ searchAllowedInvocation()

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

Definition at line 264 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'

Definition at line 42 of file FilePersistenceSlot.php.

◆ 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'