PHP Class Neos\FluidAdaptor\View\StandaloneView

Helpful if you want to use Fluid separately from MVC E.g. to generate template based emails.
Inheritance: extends AbstractTemplateView
Show file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$environment Neos\Flow\Utility\Environment
$flashMessageContainer Neos\Flow\Mvc\FlashMessageContainer
$layoutRootPath string absolute root path of the folder that contains Fluid layouts
$partialRootPath string absolute root path of the folder that contains Fluid partials
$request Neos\Flow\Mvc\ActionRequest
$templatePathAndFilename string absolute path of the Fluid template
$templateSource string Source code of the Fluid template

Public Methods

Method Description
__construct ( ActionRequest $request = null, array $options = [] ) Constructor
createWithOptions ( array $options ) : StandaloneView Factory method to create an instance with given options.
getFormat ( ) : string Returns the format of the current request (defaults is "html")
getLayoutRootPaths ( ) : string Resolves the layout root to be used inside other paths.
getPartialRootPaths ( ) : string Returns the absolute path to the folder that contains Fluid partial files
getRequest ( ) : Neos\Flow\Mvc\RequestInterface Returns the current request object
getTemplatePathAndFilename ( ) : string Returns the absolute path to a Fluid template file if it was specified with setTemplatePathAndFilename() before
hasTemplate ( ) : boolean Checks whether a template can be resolved for the current request
initializeObject ( ) : void Initiates the StandaloneView by creating the required ControllerContext
setFormat ( string $format ) : void Sets the format of the current request (default format is "html")
setLayoutRootPath ( string $layoutRootPath ) : void Sets the absolute path to the folder that contains Fluid layout files
setLayoutRootPaths ( array $layoutRootPaths ) : void Set the root path(s) to the layouts.
setPartialRootPath ( string $partialRootPath ) : void Sets the absolute path to the folder that contains Fluid partial files.
setPartialRootPaths ( array $partialRootPaths ) : void Set the root path(s) to the partials.
setTemplate ( string $templateName )
setTemplatePathAndFilename ( string $templatePathAndFilename ) : void Sets the absolute path to a Fluid template file
setTemplateRootPaths ( array $templateRootPaths ) : void Set the root path(s) to the templates.
setTemplateSource ( string $templateSource ) : void Sets the Fluid template source You can use setTemplatePathAndFilename() alternatively if you only want to specify the template path

Method Details

__construct() public method

Constructor
public __construct ( ActionRequest $request = null, array $options = [] )
$request Neos\Flow\Mvc\ActionRequest The current action request. If none is specified it will be created from the environment.
$options array

createWithOptions() public static method

Factory method to create an instance with given options.
public static createWithOptions ( array $options ) : StandaloneView
$options array
return StandaloneView

getFormat() public method

Returns the format of the current request (defaults is "html")
public getFormat ( ) : string
return string $format

getLayoutRootPaths() public method

Resolves the layout root to be used inside other paths.
public getLayoutRootPaths ( ) : string
return string Fluid layout root path

getPartialRootPaths() public method

Returns the absolute path to the folder that contains Fluid partial files
public getPartialRootPaths ( ) : string
return string Fluid partial root path

getRequest() public method

Returns the current request object
public getRequest ( ) : Neos\Flow\Mvc\RequestInterface
return Neos\Flow\Mvc\RequestInterface

getTemplatePathAndFilename() public method

Returns the absolute path to a Fluid template file if it was specified with setTemplatePathAndFilename() before
public getTemplatePathAndFilename ( ) : string
return string Fluid template path

hasTemplate() public method

Checks whether a template can be resolved for the current request
public hasTemplate ( ) : boolean
return boolean

initializeObject() public method

Initiates the StandaloneView by creating the required ControllerContext
public initializeObject ( ) : void
return void

setFormat() public method

Sets the format of the current request (default format is "html")
public setFormat ( string $format ) : void
$format string
return void

setLayoutRootPath() public method

Sets the absolute path to the folder that contains Fluid layout files
public setLayoutRootPath ( string $layoutRootPath ) : void
$layoutRootPath string Fluid layout root path
return void

setLayoutRootPaths() public method

Set the root path(s) to the layouts.
public setLayoutRootPaths ( array $layoutRootPaths ) : void
$layoutRootPaths array Root path to the layouts
return void

setPartialRootPath() public method

Sets the absolute path to the folder that contains Fluid partial files.
public setPartialRootPath ( string $partialRootPath ) : void
$partialRootPath string Fluid partial root path
return void

setPartialRootPaths() public method

If set, overrides the one determined from $this->partialRootPathPattern
public setPartialRootPaths ( array $partialRootPaths ) : void
$partialRootPaths array Root paths to the partials. If set, overrides the one determined from $this->partialRootPathPattern
return void

setTemplate() public method

public setTemplate ( string $templateName )
$templateName string

setTemplatePathAndFilename() public method

Sets the absolute path to a Fluid template file
public setTemplatePathAndFilename ( string $templatePathAndFilename ) : void
$templatePathAndFilename string Fluid template path
return void

setTemplateRootPaths() public method

Set the root path(s) to the templates.
public setTemplateRootPaths ( array $templateRootPaths ) : void
$templateRootPaths array Root paths to the templates.
return void

setTemplateSource() public method

Sets the Fluid template source You can use setTemplatePathAndFilename() alternatively if you only want to specify the template path
public setTemplateSource ( string $templateSource ) : void
$templateSource string Fluid template source code
return void

Property Details

$environment protected property

protected Environment,Neos\Flow\Utility $environment
return Neos\Flow\Utility\Environment

$flashMessageContainer protected property

protected FlashMessageContainer,Neos\Flow\Mvc $flashMessageContainer
return Neos\Flow\Mvc\FlashMessageContainer

$layoutRootPath protected property

absolute root path of the folder that contains Fluid layouts
protected string $layoutRootPath
return string

$partialRootPath protected property

absolute root path of the folder that contains Fluid partials
protected string $partialRootPath
return string

$request protected property

protected ActionRequest,Neos\Flow\Mvc $request
return Neos\Flow\Mvc\ActionRequest

$templatePathAndFilename protected property

absolute path of the Fluid template
protected string $templatePathAndFilename
return string

$templateSource protected property

Source code of the Fluid template
protected string $templateSource
return string