\FW\View\StandardFWViewManager

View manager class

Summary

Methods
Properties
Constants
__construct()
init()
registerHelper()
helper()
getContentType()
No public properties found
No constants found
No protected methods found
$container
$helpers
$currentHelper
N/A
No private methods found
No private properties found
N/A

Properties

$helpers

$helpers : array

Array of helper objects that have been registered

Type

array

Methods

__construct()

__construct(\FW\Utils\Container  $c) 

Classes that inherit from this class cannot override the constructor.

Sets up the injector

Parameters

\FW\Utils\Container $c

The dependency injection container

init()

init() 

{@inheritdoc}

registerHelper()

registerHelper(string  $className, string|null  $alias = null) 

Registers a helper

If alias is provided, the helper is accessible via $view->helper('whatever-alias-you-provided'). If not, it will be accessible through the View classname.

Parameters

string $className

Classname of the helper to register

string|null $alias

Alias of the class if desired

helper()

helper(string  $name) : \FW\View\Standard\HelperInterface|null

Retrieves a helper

Parameters

string $name

The name of the helper

Returns

\FW\View\Standard\HelperInterface|null

getContentType()

getContentType() : string

Gets the content type

Returns

string —

The content type