Abstract view renderer class. The renderer is what turns XML view templates
into actual HTML code, renders the submenu links and potentially wraps the HTML
output in a div with a component-specific ID.
public
object
|
#
getInformation( )
Returns the information about this renderer
Returns the information about this renderer
Returns
object
|
abstract public
|
#
preRender( string $view, string $task, FOFInput $input, array $config = array() )
Echoes any HTML to show before the view template
Echoes any HTML to show before the view template
Parameters
- $view
string - $view The current view
- $task
string - $task The current task
- $input
FOFInput - $input The input array (request parameters)
- $config
array - $config The view configuration array
|
abstract public
|
#
postRender( string $view, string $task, FOFInput $input, array $config = array() )
Echoes any HTML to show after the view template
Echoes any HTML to show after the view template
Parameters
- $view
string - $view The current view
- $task
string - $task The current task
- $input
FOFInput - $input The input array (request parameters)
- $config
array - $config The view configuration array
|
public
string
|
#
renderForm( FOFForm & $form, FOFModel $model, FOFInput $input, string $formType = null, boolean $raw = false )
Renders a FOFForm and returns the corresponding HTML
Renders a FOFForm and returns the corresponding HTML
Parameters
- $form
FOFForm - &$form The form to render
- $model
FOFModel - $model The model providing our data
- $input
FOFInput - $input The input object
- $formType
string - $formType The form type: edit, browse or read
- $raw
boolean - $raw If true, the raw form fields rendering (without the surrounding form tag)
is returned.
Returns
string - The HTML rendering of the form
|
public
|
#
renderCategoryLinkbar( string $extension, array $config = array() )
Renders the submenu (link bar) for a category view when it is used in a
extension
Renders the submenu (link bar) for a category view when it is used in a
extension
Note: this function has to be called from the addSubmenu function in the
ExtensionNameHelper class located in
administrator/components/com_ExtensionName/helpers/Extensionname.php
Example Code:
class ExtensionNameHelper { public static function addSubmenu($vName) { //
Load FOF include_once JPATH_LIBRARIES . '/fof/include.php';
if (!defined('FOF_INCLUDED')) { JError::raiseError('500', 'FOF is not
installed'); }
if (version_compare(JVERSION, '3.0', 'ge')) { $strapper = new FOFRenderJoomla3;
} else { $strapper = new FOFRenderJoomla; }
$strapper->renderCategoryLinkbar('com_babioonevent'); } }
Parameters
- $extension
string - $extension The name of the extension
- $config
array - $config Extra configuration variables for the toolbar
|
abstract protected
string
|
#
renderFormBrowse( FOFForm & $form, FOFModel $model, FOFInput $input )
Renders a FOFForm for a Browse view and returns the corresponding HTML
Renders a FOFForm for a Browse view and returns the corresponding HTML
Parameters
- $form
FOFForm - &$form The form to render
- $model
FOFModel - $model The model providing our data
- $input
FOFInput - $input The input object
Returns
string - The HTML rendering of the form
|
abstract protected
string
|
#
renderFormRead( FOFForm & $form, FOFModel $model, FOFInput $input )
Renders a FOFForm for a Read view and returns the corresponding HTML
Renders a FOFForm for a Read view and returns the corresponding HTML
Parameters
- $form
FOFForm - &$form The form to render
- $model
FOFModel - $model The model providing our data
- $input
FOFInput - $input The input object
Returns
string - The HTML rendering of the form
|
abstract protected
string
|
#
renderFormEdit( FOFForm & $form, FOFModel $model, FOFInput $input )
Renders a FOFForm for an Edit view and returns the corresponding HTML
Renders a FOFForm for an Edit view and returns the corresponding HTML
Parameters
- $form
FOFForm - &$form The form to render
- $model
FOFModel - $model The model providing our data
- $input
FOFInput - $input The input object
Returns
string - The HTML rendering of the form
|
abstract protected
string
|
#
renderFormRaw( FOFForm & $form, FOFModel $model, FOFInput $input, string $formType )
Renders a raw FOFForm and returns the corresponding HTML
Renders a raw FOFForm and returns the corresponding HTML
Parameters
- $form
FOFForm - &$form The form to render
- $model
FOFModel - $model The model providing our data
- $input
FOFInput - $input The input object
- $formType
string - $formType The form type e.g. 'edit' or 'read'
Returns
string - The HTML rendering of the form
|
protected
string
|
#
renderFieldset( stdClass & $fieldset, FOFForm & $form, FOFModel $model, FOFInput $input, string $formType, boolean $showHeader = true )
Renders a raw fieldset of a FOFForm and returns the corresponding HTML
Renders a raw fieldset of a FOFForm and returns the corresponding HTML
Parameters
- $fieldset
stdClass - &$fieldset The fieldset to render
- $form
FOFForm - &$form The form to render
- $model
FOFModel - $model The model providing our data
- $input
FOFInput - $input The input object
- $formType
string - $formType The form type e.g. 'edit' or 'read'
- $showHeader
boolean - $showHeader Should I render the fieldset's header?
Returns
string - The HTML rendering of the fieldset
TODO:
Convert to an abstract method or interface at FOF3
|
protected
string
|
#
renderFieldsetLabel( object $field, FOFForm & $form, string $title )
Renders a label for a fieldset.
Renders a label for a fieldset.
Parameters
- $field
object - $field The field of the label to render
- $form
FOFForm - &$form The form to render
- $title
string - $title The title of the label
Returns
string - The rendered label
TODO:
Convert to an abstract method or interface at FOF3
|
protected
boolean
|
#
isTabFieldset( SimpleXMLElement $fieldset )
Checks if the fieldset defines a tab pane
Checks if the fieldset defines a tab pane
Parameters
Returns
boolean
|