Layout
in package
Base layout Class. Layouts are used to render the headers and footer of the page on which a View lives
Tags
Table of Contents
- $view : object
- The view that is to be drawn on this layout
- __construct() : mixed
- The constructor sets the view that will be drawn inside the Layout.
- render() : mixed
- The render method of Layout and its subclasses is responsible for drawing the header of the document, calling the renderView method of the View that lives on the layout and then drawing the footer of the document.
Properties
$view
The view that is to be drawn on this layout
public
object
$view
Methods
__construct()
The constructor sets the view that will be drawn inside the Layout.
public
__construct(object $v) : mixed
Parameters
- $v : object
-
the View object that uses this layout
Return values
mixed —render()
The render method of Layout and its subclasses is responsible for drawing the header of the document, calling the renderView method of the View that lives on the layout and then drawing the footer of the document.
public
render(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
an array of data set up by the controller to be be used in drawing the Layout and its View.