PHP Interface FOF30\Render\RenderInterface

Datei anzeigen Open project: akeeba/fof

Public Methods

Method Description
__construct ( Container $container ) Public constructor
getInformation ( ) : object Returns the information about this renderer
getOption ( string $key, mixed $default = null ) : mixed Get the value of a renderer option
isTabFieldset ( SimpleXMLElement $fieldset ) : boolean Checks if the fieldset defines a tab pane
postRender ( string $view, string $task ) : void Echoes any HTML to show after the view template
preRender ( string $view, string $task ) : void Echoes any HTML to show before the view template
renderCategoryLinkbar ( ) : void Renders the submenu (link bar) for a category view when it is used in a extension
renderFieldset ( stdClass &$fieldset, Form &$form, DataModel $model, string $formType, boolean $showHeader = true ) : string Renders a raw fieldset of a F0FForm and returns the corresponding HTML
renderFieldsetLabel ( object $field, Form &$form, string $title ) : string Renders a label for a fieldset.
renderForm ( Form &$form, DataModel $model, string $formType = null, boolean $raw = false ) : string Renders a Form and returns the corresponding HTML
renderFormBrowse ( Form &$form, DataModel $model ) : string Renders a F0FForm for a Browse view and returns the corresponding HTML
renderFormEdit ( Form &$form, DataModel $model ) : string Renders a F0FForm for an Edit view and returns the corresponding HTML
renderFormRaw ( Form &$form, DataModel $model, string $formType = null ) : string Renders a F0FForm for an Edit view and returns the corresponding HTML
renderFormRead ( Form &$form, DataModel $model ) : string Renders a F0FForm for a Read view and returns the corresponding HTML
setOption ( string $key, string $value ) : void Set a renderer option (depends on the renderer)
setOptions ( array $options ) : void Set multiple renderer options at once (depends on the renderer)

Method Details

__construct() public method

Public constructor
public __construct ( Container $container )
$container FOF30\Container\Container The container we are attached to

getInformation() public method

Returns the information about this renderer
public getInformation ( ) : object
return object

getOption() public method

Get the value of a renderer option
public getOption ( string $key, mixed $default = null ) : mixed
$key string The name of the parameter
$default mixed The default value to return if the parameter is not set
return mixed The parameter value

isTabFieldset() public method

Checks if the fieldset defines a tab pane
public isTabFieldset ( SimpleXMLElement $fieldset ) : boolean
$fieldset SimpleXMLElement
return boolean

postRender() public method

Echoes any HTML to show after the view template
public postRender ( string $view, string $task ) : void
$view string The current view
$task string The current task
return void

preRender() public method

Echoes any HTML to show before the view template
public preRender ( string $view, string $task ) : void
$view string The current view
$task string The current task
return void

renderFieldset() public method

Renders a raw fieldset of a F0FForm and returns the corresponding HTML
public renderFieldset ( stdClass &$fieldset, Form &$form, DataModel $model, string $formType, boolean $showHeader = true ) : string
$fieldset stdClass
$form FOF30\Form\Form
$model FOF30\Model\DataModel The model providing our data
$formType string The form type e.g. 'edit' or 'read'
$showHeader boolean Should I render the fieldset's header?
return string The HTML rendering of the fieldset

renderFieldsetLabel() public method

Renders a label for a fieldset.
public renderFieldsetLabel ( object $field, Form &$form, string $title ) : string
$field object The field of the label to render
$form FOF30\Form\Form
$title string The title of the label
return string The rendered label

renderForm() public method

Renders a Form and returns the corresponding HTML
public renderForm ( Form &$form, DataModel $model, string $formType = null, boolean $raw = false ) : string
$form FOF30\Form\Form
$model FOF30\Model\DataModel The model providing our data
$formType string The form type: edit, browse or read
$raw boolean If true, the raw form fields rendering (without the surrounding form tag) is returned.
return string The HTML rendering of the form

renderFormBrowse() public method

Renders a F0FForm for a Browse view and returns the corresponding HTML
public renderFormBrowse ( Form &$form, DataModel $model ) : string
$form FOF30\Form\Form
$model FOF30\Model\DataModel The model providing our data
return string The HTML rendering of the form

renderFormEdit() public method

Renders a F0FForm for an Edit view and returns the corresponding HTML
public renderFormEdit ( Form &$form, DataModel $model ) : string
$form FOF30\Form\Form
$model FOF30\Model\DataModel The model providing our data
return string The HTML rendering of the form

renderFormRaw() public method

Renders a F0FForm for an Edit view and returns the corresponding HTML
public renderFormRaw ( Form &$form, DataModel $model, string $formType = null ) : string
$form FOF30\Form\Form
$model FOF30\Model\DataModel The model providing our data
$formType string The form type: edit, browse or read
return string The HTML rendering of the form

renderFormRead() public method

Renders a F0FForm for a Read view and returns the corresponding HTML
public renderFormRead ( Form &$form, DataModel $model ) : string
$form FOF30\Form\Form
$model FOF30\Model\DataModel The model providing our data
return string The HTML rendering of the form

setOption() public method

Set a renderer option (depends on the renderer)
public setOption ( string $key, string $value ) : void
$key string The name of the option to set
$value string The value of the option
return void

setOptions() public method

Set multiple renderer options at once (depends on the renderer)
public setOptions ( array $options ) : void
$options array The options to set as key => value pairs
return void