Since: 3.1

class LayoutHelper

Helper to render a Layout object, storing a base path

Properties

static string Since: 3.1
$defaultBasePath

A default base path that will be used if none is provided when calling the render method.

Methods

static string
debug(string $layoutFile, mixed $displayData = null, string $basePath = '', mixed $options = null)

Method to render a layout with debug info

static string
render(string $layoutFile, mixed $displayData = null, string $basePath = '', mixed $options = null)

Method to render the layout.

Details

static string debug(string $layoutFile, mixed $displayData = null, string $basePath = '', mixed $options = null)

Since: 3.5

Method to render a layout with debug info

Parameters

string $layoutFile

Dot separated path to the layout file, relative to base path

mixed $displayData

Object which properties are used inside the layout file to build displayed output

string $basePath

Base path to use when loading layout files

mixed $options

Optional custom options to load. Registry or array format

Return Value

string

static string render(string $layoutFile, mixed $displayData = null, string $basePath = '', mixed $options = null)

Since: 3.1

Method to render the layout.

Parameters

string $layoutFile

Dot separated path to the layout file, relative to base path

mixed $displayData

Object which properties are used inside the layout file to build displayed output

string $basePath

Base path to use when loading layout files

mixed $options

Optional custom options to load. Registry or array format

Return Value

string