PHP Class FormBuilderVocabulary, pkp-lib

Mostrar archivo Open project: pkp/pkp-lib

Public Properties

Property Type Description
$_fbvStyles Styles organized by parameter name
$_form Form associated with this object, if any. Will inform smarty which forms to label as required *

Public Methods

Method Description
__construct ( $form = null ) Constructor.
_addClientSideValidation ( $params ) Assign the appropriate class name to the element for client-side validation
_getLayoutInfo ( $params ) : string Cycle through layout parameters to add the appropriate classes to the element's parent container
_smartyFBVAutocompleteInput ( $params, &$smarty ) Form Autocomplete text input. (actually two inputs, label and value) parameters: disabled (optional), name (optional - assigned value of 'id' by default)
_smartyFBVButton ( $params, &$smarty ) Form button.
_smartyFBVCheckbox ( $params, &$smarty ) Checkbox input control.
_smartyFBVCheckboxGroup ( $params, &$smarty ) Form checkbox group control.
_smartyFBVColour ( $params, &$smarty ) Form colour input.
_smartyFBVFileInput ( $params, &$smarty ) File upload input.
_smartyFBVHiddenInput ( $params, &$smarty ) Hidden input element.
_smartyFBVInterestsInput ( $params, &$smarty ) Reviewing interests input.
_smartyFBVKeywordInput ( $params, &$smarty ) Keyword input.
_smartyFBVRadioButton ( $params, &$smarty ) Radio input control.
_smartyFBVRangeSlider ( $params, &$smarty ) Range slider input.
_smartyFBVSelect ( $params, &$smarty ) Form select control.
_smartyFBVSubLabel ( $params, &$smarty ) Custom Smarty function for labelling/highlighting of form fields.
_smartyFBVTextArea ( $params, &$smarty ) Form text area.
_smartyFBVTextInput ( $params, &$smarty ) Form text input.
getForm ( ) : Object Get the form
getStyles ( ) : array Get the form style constants
setForm ( $form ) Set the form
smartyFBVElement ( $params, &$smarty, $content = null ) Base form element.
smartyFBVFormArea ( $params, $content, &$smarty, &$repeat ) A form area that contains form sections.
smartyFBVFormButtons ( $params, &$smarty ) Submit and (optional) cancel button for a form.
smartyFBVFormSection ( $params, $content, &$smarty, &$repeat ) A form section that contains controls in a variety of layout possibilities.
smartyFieldLabel ( $params, &$smarty ) Custom Smarty function for labelling/highlighting of form fields.

Method Details

__construct() public method

Constructor.
public __construct ( $form = null )
$form object Form associated with this object

_addClientSideValidation() public method

Assign the appropriate class name to the element for client-side validation
public _addClientSideValidation ( $params )
$params array return array

_getLayoutInfo() public method

Cycle through layout parameters to add the appropriate classes to the element's parent container
public _getLayoutInfo ( $params ) : string
$params array
return string

_smartyFBVAutocompleteInput() public method

Form Autocomplete text input. (actually two inputs, label and value) parameters: disabled (optional), name (optional - assigned value of 'id' by default)
public _smartyFBVAutocompleteInput ( $params, &$smarty )
$params array
$smarty object

_smartyFBVButton() public method

parameters: label (or value), disabled (optional), type (optional)
public _smartyFBVButton ( $params, &$smarty )
$params array
$smarty object

_smartyFBVCheckbox() public method

parameters: label, disabled (optional), translate (optional), name (optional - value of 'id' by default)
public _smartyFBVCheckbox ( $params, &$smarty )
$params array
$smarty object

_smartyFBVCheckboxGroup() public method

parameters: from [array], selected [array index], defaultLabel (optional), defaultValue (optional), disabled (optional), translate (optional), name (optional - value of 'id' by default)
public _smartyFBVCheckboxGroup ( $params, &$smarty )
$params array
$smarty object

_smartyFBVColour() public method

parameters: disabled (optional), name (optional - assigned value of 'id' by default)
public _smartyFBVColour ( $params, &$smarty )
$params array
$smarty object

_smartyFBVFileInput() public method

parameters: submit (optional - name of submit button to include), disabled (optional), name (optional - value of 'id' by default)
public _smartyFBVFileInput ( $params, &$smarty )
$params array
$smarty object

_smartyFBVHiddenInput() public method

parameters: value, id, name (optional - assigned value of 'id' by default), disabled (optional), multilingual (optional)
public _smartyFBVHiddenInput ( $params, &$smarty )
$params array
$smarty object

_smartyFBVInterestsInput() public method

parameters: interests - current users's keywords (array)
public _smartyFBVInterestsInput ( $params, &$smarty )
$params array
$smarty object

_smartyFBVKeywordInput() public method

parameters: available - all available keywords (for autosuggest); current - user's current keywords
public _smartyFBVKeywordInput ( $params, &$smarty )
$params array
$smarty object

_smartyFBVRadioButton() public method

parameters: label, disabled (optional), translate (optional), name (optional - value of 'id' by default)
public _smartyFBVRadioButton ( $params, &$smarty )
$params array
$smarty object

_smartyFBVRangeSlider() public method

parameters: min, max
public _smartyFBVRangeSlider ( $params, &$smarty )
$params array
$smarty object

_smartyFBVSelect() public method

parameters: from [array], selected [array index], defaultLabel (optional), defaultValue (optional), disabled (optional), translate (optional), name (optional - value of 'id' by default)
public _smartyFBVSelect ( $params, &$smarty )
$params array
$smarty object

_smartyFBVSubLabel() public method

Custom Smarty function for labelling/highlighting of form fields.
public _smartyFBVSubLabel ( $params, &$smarty )
$params array can contain 'name' (field name/ID), 'required' (required field), 'key' (localization key), 'label' (non-localized label string), 'suppressId' (boolean)
$smarty Smarty

_smartyFBVTextArea() public method

parameters: - value: string for single language inputs, array (xx_YY => language_value) for multilingual - name: string (optional - assigned value based on ID by default) - disabled: boolean (default false) - multilingual: boolean (default false) - rich: false (default), true, or 'extended'
public _smartyFBVTextArea ( $params, &$smarty )
$params array
$smarty object

_smartyFBVTextInput() public method

parameters: disabled (optional), name (optional - assigned value of 'id' by default), multilingual (optional)
public _smartyFBVTextInput ( $params, &$smarty )
$params array
$smarty object

getForm() public method

Get the form
public getForm ( ) : Object
return Object

getStyles() public method

Get the form style constants
public getStyles ( ) : array
return array

setForm() public method

Set the form
public setForm ( $form )
$form object

smartyFBVElement() public method

Base form element.
public smartyFBVElement ( $params, &$smarty, $content = null )
$params array
$smarty object-

smartyFBVFormArea() public method

A form area that contains form sections.
public smartyFBVFormArea ( $params, $content, &$smarty, &$repeat )
$params array
$content string
$smarty object
$repeat

smartyFBVFormButtons() public method

Submit and (optional) cancel button for a form.
public smartyFBVFormButtons ( $params, &$smarty )
$params array
$smarty object

smartyFBVFormSection() public method

A form section that contains controls in a variety of layout possibilities.
public smartyFBVFormSection ( $params, $content, &$smarty, &$repeat )
$params array
$content string
$smarty object
$repeat

smartyFieldLabel() public method

Custom Smarty function for labelling/highlighting of form fields.
public smartyFieldLabel ( $params, &$smarty )
$params array can contain 'name' (field name/ID), 'required' (required field), 'key' (localization key), 'label' (non-localized label string), 'suppressId' (boolean)
$smarty Smarty

Property Details

$_fbvStyles public_oe property

Styles organized by parameter name
public $_fbvStyles

$_form public_oe property

Form associated with this object, if any. Will inform smarty which forms to label as required *
public $_form