Wordless
Stop writing themes like it's 1998.
|
Handles rendering of views, templates, partials. More...
Public Member Functions | |
render_error ($title, $description) | |
Renders a preformatted error display view than dies. More... | |
render_template ($name, $locals=array()) | |
Renders a template and its contained plartials. More... | |
get_partial_content ($name, $locals=array()) | |
Retrievs contents of partial without printing theme. More... | |
render_partial ($name, $locals=array()) | |
Renders a partial: those views followed by an underscore by convention. More... | |
wl_yield () | |
Yield is almost inside every good templates. More... | |
render_view ($name, $layout='default', $locals=array()) | |
Renders a view. More... | |
Handles rendering of views, templates, partials.
RenderHelper::get_partial_content | ( | $name, | |
$locals = array() |
|||
) |
Retrievs contents of partial without printing theme.
string | $name | The template filenames (those not starting with an underscore by convention) |
array | $locals | An associative array. Keys will be variables' names and values will be variable values inside the partial |
RenderHelper::render_error | ( | $title, | |
$description | |||
) |
Renders a preformatted error display view than dies.
string | $title | A title for the error |
string | $description | An explanation about the error |
RenderHelper::render_partial | ( | $name, | |
$locals = array() |
|||
) |
Renders a partial: those views followed by an underscore by convention.
Partials are inside theme/views.
string | $name | The partial filenames (those starting with an underscore by convention) |
array | $locals | An associative array. Keys will be variables' names and values will be variable values inside the partial |
RenderHelper::render_template | ( | $name, | |
$locals = array() |
|||
) |
Renders a template and its contained plartials.
Accepts a list of locals variables which will be available inside the code of the template
string | $name | The template filenames (those not starting with an underscore by convention) |
array | $locals | An associative array. Keys will be variables' names and values will be variable values inside the template |
RenderHelper::render_view | ( | $name, | |
$layout = 'default' , |
|||
$locals = array() |
|||
) |
Renders a view.
Views are rendered based on the routing. They will show a template and a yielded content based on the user requested page.
string | $name | Filename with path relative to theme/views |
string | $layout | The template to use to render the view |
array | $locals | An associative array. Keys will be variables' names and values will be variable values inside the view |
RenderHelper::wl_yield | ( | ) |
Yield is almost inside every good templates.
Based on the rendering view yield() will insert inside the template the specific required content (usually called partials)