TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
AbstractFinisher Class Reference
Inheritance diagram for AbstractFinisher:
FinisherInterface ClosureFinisher ConfirmationFinisher DeleteUploadsFinisher EmailFinisher FlashMessageFinisher RedirectFinisher SaveToDatabaseFinisher

Public Member Functions

 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 setOptions (array $options)
 
 setOption (string $optionName, $optionValue)
 
 execute (FinisherContext $finisherContext)
 

Protected Member Functions

 executeInternal ()
 
 parseOption (string $optionName)
 
 getTypoScriptFrontendController ()
 

Protected Attributes

 $objectManager
 
 $finisherIdentifier = ''
 
 $options = []
 
 $defaultOptions = []
 
 $finisherContext
 

Detailed Description

Finisher base class.

Scope: frontend This class is meant to be sub classed by developers

Definition at line 29 of file AbstractFinisher.php.

Member Function Documentation

execute ( FinisherContext  $finisherContext)
final

Executes the finisher

Parameters
FinisherContext$finisherContextThe Finisher context that contains the current Form Runtime and Response
Returns
void

Implements FinisherInterface.

Definition at line 103 of file AbstractFinisher.php.

References AbstractFinisher\$finisherContext, and AbstractFinisher\executeInternal().

executeInternal ( )
abstractprotected

This method is called in the concrete finisher whenever self::execute() is called.

Override and fill with your own implementation!

Returns
void

Referenced by AbstractFinisher\execute().

getTypoScriptFrontendController ( )
protected
Returns
TypoScriptFrontendController

Definition at line 212 of file AbstractFinisher.php.

References $GLOBALS.

Referenced by RedirectFinisher\redirect().

injectObjectManager ( \TYPO3\CMS\Extbase\Object\ObjectManagerInterface  $objectManager)
Parameters
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface$objectManager

Definition at line 68 of file AbstractFinisher.php.

References AbstractFinisher\$objectManager.

parseOption ( string  $optionName)
protected

Read the option called $optionName from $this->options, and parse {...} as object accessors.

Then translate the value.

If $optionName was not found, the corresponding default option is returned (from $this->defaultOptions)

Parameters
string$optionName
Returns
string|array|null

Definition at line 132 of file AbstractFinisher.php.

References TranslationService\getInstance(), ObjectAccess\getPropertyPath(), and ArrayUtility\getValueByPath().

Referenced by SaveToDatabaseFinisher\executeInternal(), ConfirmationFinisher\executeInternal(), RedirectFinisher\executeInternal(), FlashMessageFinisher\executeInternal(), EmailFinisher\executeInternal(), and EmailFinisher\initializeStandaloneView().

setOption ( string  $optionName,
  $optionValue 
)

Sets a single finisher option (

See also
setOptions())
Parameters
string$optionNamename of the option to be set
mixed$optionValuevalue of the option
Returns
void

Implements FinisherInterface.

Definition at line 91 of file AbstractFinisher.php.

setOptions ( array  $options)
Parameters
array$optionsconfiguration options in the format ['option1' => 'value1', 'option2' => 'value2', ...]
Returns
void

Implements FinisherInterface.

Definition at line 78 of file AbstractFinisher.php.

References AbstractFinisher\$options.

Member Data Documentation

$defaultOptions = []
protected

Definition at line 57 of file AbstractFinisher.php.

$finisherContext
protected

Definition at line 62 of file AbstractFinisher.php.

Referenced by AbstractFinisher\execute().

$finisherIdentifier = ''
protected

Definition at line 40 of file AbstractFinisher.php.

$objectManager
protected

Definition at line 35 of file AbstractFinisher.php.

Referenced by AbstractFinisher\injectObjectManager().

$options = []
protected

Definition at line 48 of file AbstractFinisher.php.

Referenced by AbstractFinisher\setOptions().