UNA
Loading...
Searching...
No Matches
BxBaseFormView Class Reference
Inheritance diagram for BxBaseFormView:
BxDolForm BxDol iBxDolReplaceable BxDolStudioForm BxTemplFormView BxTemplFormView BxBaseStudioFormView BxAclFormPrice BxAdsFormOffer BxAdsFormSourcesDetails BxAlbumsFormMedia BxBaseCmtsForm BxBaseFormAccount BxBaseFormConfirmEmail BxBaseFormConfirmPhone BxBaseFormForgotPassword BxBaseFormLogin BxBaseFormProfile BxBaseFormWiki BxBaseLabelForm BxBaseModGeneralFormEntry BxBaseModGroupsFormPrice BxBaseModGroupsFormQuestion BxBaseModTextFormPoll BxBasePrivacyFormGroupCustom BxBaseSearchExtendedForm BxCreditsFormCredit BxDolFormNested BxDolFormNestedGhost BxElsFormManage BxEventsFormSession BxForumFormSearch BxMarketFormLicense BxOAuthFormAdd BxPaymentFormDetails BxPaymentFormInvoices BxPaymentFormView BxShopifyFormSettings BxSnipcartFormSettings BxTasksFormListEntry BxTimelineFormRepost BxAclFormPrice BxAdsFormOffer BxAdsFormSourcesDetails BxAlbumsFormMedia BxBaseCmtsForm BxBaseFormAccount BxBaseFormConfirmEmail BxBaseFormConfirmPhone BxBaseFormForgotPassword BxBaseFormLogin BxBaseFormProfile BxBaseFormWiki BxBaseLabelForm BxBaseModGeneralFormEntry BxBaseModGroupsFormPrice BxBaseModGroupsFormQuestion BxBaseModTextFormPoll BxBasePrivacyFormGroupCustom BxBaseSearchExtendedForm BxCreditsFormCredit BxDolFormNested BxDolFormNestedGhost BxElsFormManage BxEventsFormSession BxForumFormSearch BxMarketFormLicense BxOAuthFormAdd BxPaymentFormDetails BxPaymentFormInvoices BxPaymentFormView BxShopifyFormSettings BxSnipcartFormSettings BxTasksFormListEntry BxTimelineFormRepost

Public Member Functions

 __construct ($aInfo, $oTemplate)
 
 performActionGetHelp ()
 
 performActionChangePrivacyGroup ()
 
 performActionGetPrivacyGroupChooser ()
 
 setShowEmptySections ($b)
 
 setAjaxMode ($bAjaxMode)
 
 isAjaxMode ()
 
 setAbsoluteActionUrl ($sUrl)
 
 getCode ($bDynamicMode=false)
 
 getCodeAPI ()
 
 getJsClassName ()
 
 getJsObjectName ()
 
 getJsScript ($bWrap=false)
 
 genForm ()
 
 genRows ()
 
 genRow (&$aInput)
 
 isInputVisible ($mixedInput)
 
 genViewRow (&$aInput)
 
 genViewRowWrapped (&$aInput)
 
 genViewRowWrappedHtml (&$aInput)
 
 genViewRowValue (&$aInput)
 
 genViewRowValueForSelect (&$aInput)
 
 genRowStandard (&$aInput, $isOneLine=false)
 
 genWrapperInput ($aInput, $sContent)
 
 genRowCustom (&$aInput, $sCustomMethod)
 
 genRowBlockHeader (&$aInput)
 
 genBlockEnd ()
 
 genInput (&$aInput)
 
 getInputId (&$aInput)
 
 genInputStandard (&$aInput)
 
 genInputSwitcher (&$aInput)
 
 genInputButton (&$aInput)
 
 genInputTextarea (&$aInput)
 
 isHtmlEditor ($iViewMode, &$aInput)
 
 addHtmlEditor ($iViewMode, &$aInput, $sUniq)
 
 getHtmlEditorQueryParams ($aInput)
 
 genInputSelectBox (&$aInput, $sInfo='', $sError='')
 
 genInputFile (&$aInput)
 
 genInputFiles (&$aInput, $sInfo='', $sError='')
 
 genInputSelect (&$aInput)
 
 genInputSelectRgb (&$aInput)
 
 genInputSelectMultiple (&$aInput)
 
 genInputCheckboxSet (&$aInput)
 
 genInputRadioSet (&$aInput)
 
 _isSelected ($sValue, $sCurValue)
 
 _isSelectedMultiple ($sValue, $aCurValues)
 
 _genInputSelect (&$aInput, $isMultiple, $mixedCurrentVal, $sIsSelectedFunc)
 
 _genInputsSet (&$aInput, $sType, $mixedCurrentVal, $sIsCheckedFunc, $sNameAppend='')
 
 genInputLocation (&$aInput)
 
 setLocationVals ($aInput, $aVals)
 
 setLocationVal ($aInput, $sIndex, $sVal)
 
 genInputPassword (&$aInput)
 
 genInputPrice (&$aInput)
 
 genInputNestedForm (&$aInput)
 
 genNestedForm (&$aInput)
 
 genInputCaptcha (&$aInput)
 
 genLabel (&$aInput)
 
 genPrivacyGroupChooser (&$aInput, $sPrivacyObject='')
 
 genFiledItemInfoWrapper ($sInput, $sInfoValue)
 
 genInfoIcon ($sInfo)
 
 genErrorIcon ( $sError='')
 
 getOpenSection ($aAttrs=[], $sTitle='', $aWrapperAttrs=[])
 
 getCloseSection ()
 
 getOpenSectionViewMode ($aAttrs=array(), $sTitle='', $aWrapperAttrs=[])
 
 getCloseSectionViewMode ()
 
 addCssJsUi ()
 
 addCssJsUiSortable ()
 
 addCssJsTimepicker ()
 
 addCssJsMinicolors ()
 
 addCssJsViewMode ()
 
 addCssJsCore ()
 
 addCssJs ()
 
- Public Member Functions inherited from BxDolForm
 initChecker ($aValues=array(), $aSpecificValues=array())
 
 getKeyValuesPair ()
 
 insert ($aValsToAdd=array(), $isIgnore=false)
 
 update ($val, $aValsToAdd=array(), &$aTrackTextFieldsChanges=null)
 
 isStatusFieldSupported ()
 
 autoSetToPending (&$aValsToAdd)
 
 delete ($val)
 
 generateUri ()
 
 getCleanValue ($sName)
 
 isSubmitted ()
 
 getTemplate ()
 
 getId ()
 
 getName ()
 
 setId ($sId)
 
 setName ($sName)
 
 setAction ($sAction)
 
 setForceSetToPending ($isValid)
 
 setValid ($isValid)
 
 isValid ()
 
 isSubmittedAndValid ()
 
 getSpecificValues ()
 
 setSpecificValue ($sName, $sVal)
 
 getAuthorId ()
 
 setAuthorId ($iAuthorId)
 
 isFieldExist ($sName, $bCheckAllFields=false)
 
 _initCheckerNestedForms ()
 
 addMarkers ($a)
 
 getFormErrors ()
 

Static Public Member Functions

static getJsCalendarLangs ()
 
static getCssJsCalendar ()
 
- Static Public Member Functions inherited from BxDolForm
static getObjectInstance ($sObject, $sDisplayName, $oTemplate=false, $sParam='')
 
static unSetObjectInstance ($sObject, $sDisplayName, $oTemplate=false, $sParam='')
 
static getDataItems ($sKey, $isUseForSet=false, $sUseValues=BX_DATA_VALUES_DEFAULT)
 
static getSubmittedValue ($sKey, $sMethod, &$aSpecificValues=false)
 
static setSubmittedValue ($sKey, $mixedValue, $sMethod, &$aSpecificValues=false)
 
static genCsrfToken ($bReturn=false)
 
static getCsrfToken ()
 
static isCsrfTokenValid ($s, $bDeleteToken=true)
 
static onModuleUninstall ($sModuleName)
 
static isVisible ($aInput)
 

Protected Member Functions

 _isInputVisibleByPrivacy ($aInput)
 
 _genViewRowWrapped (&$aInput, $aParams=[])
 
 genCustomRowBirthday (&$aInput)
 
 genCustomRowCf (&$aInput)
 
 genCustomViewRowValueBirthday (&$aInput)
 
 _genWrapperInputAttrs (&$aInput)
 
 _genInputStandardAttrs (&$aInput)
 
 _genInputButtonAttrs (&$aInput)
 
 _genInputTextareaAttrs (&$aInput)
 
 genGhostTemplate (&$aInput)
 
 genCustomInputUsernamesSuggestions ($aInput)
 
 _genCustomInputUsernamesSuggestionsAttrs (&$aInput, $bDisabled=false)
 
 _genCustomInputUsernamesSuggestionsTextAttrs (&$aInput, $bDisabled=false)
 
 genCustomViewRowValueLabels ($aInput)
 
 genCustomInputLabels (&$aInput)
 
 _genInputSelectAttrs (&$aInput, $isMultiple)
 
 _genInputSelectOptionAttrs (&$aOption)
 
 _parseInputSelect ($sTmplName, $aTmplVars)
 
 getLocationVal ($aInput, $sIndex)
 
 _processCssJs ()
 
 _addJs ($mixed, $sJsCondition)
 
 _addCss ($mixed)
 
- Protected Member Functions inherited from BxDolForm
 _genMethodName ($s)
 
 _replaceMarkers ($a)
 
 _getPrivacyIcon ($mixedPrivacy)
 
 _getPrivacyGroup ($sPrivacyObject, $iInputId, $iAuthorId=false)
 

Protected Attributes

 $bEnableErrorIcon = true
 
 $sCode
 
 $_sCodeAdd = ''
 
 $_isSectionOpened = false
 
 $_sDivider = '<span class="bx-def-margin-left"></span>'
 
 $_sDividerAlt = '<br />'
 
 $_bDynamicMode = false
 
 $_bAjaxMode = false
 
 $_bAbsoluteActionUrl = false
 
 $_bViewMode = false
 
 $_bShowEmptySections = false
 
 $_sSectionClose = 'getCloseSection'
 
 $_sSectionOpen = 'getOpenSection'
 
 $_aJs = array()
 
 $_aCss = array()
 
 $_sJsClassName
 
 $_sJsObjectName
 
 $_aHtmlIds
 
- Protected Attributes inherited from BxDolForm
 $_aMarkers = array ()
 
 $oTemplate
 
 $_isValid = true
 
 $_bForceSetToPending = false
 
 $_sChecker
 
 $_sCheckerHelper
 
 $_aSpecificValues
 
 $_aFieldsCheckForSpam = array()
 
 $_aFieldsExcludeFromCheckForSpam = array()
 
 $_iAuthorId
 
 $_sAuthorKey
 
 $_sPrivacyObjectView
 
 $_sPrivacyGroupDefault
 

Static Protected Attributes

static $_isToggleJsAdded = false
 
static $_isCssJsAdded = false
 
static $_isCssJsUiAdded = false
 
static $_isCssJsUiSortableAdded = false
 
static $_isCssJsMinicolorsAdded = false
 
static $_isCssJsLabelsAdded = false
 
static $_isCssJsTimepickerAdded = false
 
static $_isCssJsAddedViewMode = false
 

Additional Inherited Members

- Public Attributes inherited from BxDolForm
 $aFormAttrs
 
 $aInputs
 
 $aParams
 
 $id
 
- Static Public Attributes inherited from BxDolForm
static $TYPES_SKIP = array('files' => 1, 'location' => 1, 'nested_form' => 1)
 
static $TYPES_CHECKBOX = array('checkbox' => 1, 'switcher' => 1)
 
static $TYPES_TEXT = array('text' => 1, 'textarea' => 1)
 
static $TYPES_FILE = array('file' => 1)
 
static $FUNC_SKIP_DOMAIN_CHECK = array('email' => 1, 'emails' => 1, 'emailexist' => 1, 'emailuniq' => 1, 'emailexistorempty' => 1, 'hostdomain' => 1, 'hostdomainchat' => 1, 'emailorempty' => 1)
 
static $FUNC_SKIP_MACROS_CHECK = array()
 
static $LOCATION_INDEXES = array ('lat', 'lng', 'country', 'state', 'city', 'zip', 'street', 'street_number')
 
static $LOCATION_INDEXES_MANDATORY = array ('lat', 'lng')
 

Constructor & Destructor Documentation

◆ __construct()

BxBaseFormView::__construct ( $aInfo,
$oTemplate )

Constructor

Parameters
array$aInfoForm contents

$aInfo['params'] = array( 'remove_form' => true|false, );

Returns
BxBaseFormView

Reimplemented from BxDolForm.

Reimplemented in BxAccntFormAccount, BxAclFormPrice, BxAdsFormCategory, BxAdsFormEntry, BxAdsFormOffer, BxAdsFormPoll, BxAdsFormSourcesDetails, BxAlbumsFormEntry, BxAlbumsFormMedia, BxBaseCmtsForm, BxBaseCmtsReviewsForm, BxBaseFormAccount, BxBaseFormConfirmEmail, BxBaseFormConfirmPhone, BxBaseFormForgotPassword, BxBaseFormLogin, BxBaseFormProfile, BxBaseFormWiki, BxBaseLabelForm, BxBaseModFilesFormEntry, BxBaseModFilesFormUpload, BxBaseModGeneralFormEntry, BxBaseModGroupsFormEntry, BxBaseModGroupsFormPrice, BxBaseModGroupsFormQuestion, BxBaseModProfileFormEntry, BxBaseModTextFormEntry, BxBaseModTextFormPoll, BxBasePrivacyFormGroupCustom, BxBaseSearchExtendedForm, BxBaseSearchExtendedFormCmts, BxBaseStudioFormView, BxClssFormEntry, BxClssFormPoll, BxCnlFormEntry, BxCnvFormEntry, BxCoursesFormEntry, BxCoursesFormPrice, BxCreditsFormBundle, BxCreditsFormCredit, BxCreditsFormProfile, BxDevFormView, BxDolFormNested, BxDolStudioForm, BxDonationsFormType, BxDrupalFormLogin, BxElsFormManage, BxEventsFormEntry, BxEventsFormPrice, BxEventsFormQuestion, BxEventsFormSession, BxFdbFormQuestion, BxFilesFormEntry, BxFilesFormUpload, BxForumFormEntry, BxForumFormPoll, BxForumFormSearch, BxGlsrFormEntry, BxGroupsFormEntry, BxGroupsFormPrice, BxJobsFormEntry, BxJobsFormPrice, BxJobsFormQuestion, BxMarketFormEntry, BxMarketFormLicense, BxMassMailerFormEntry, BxOrgsFormEntry, BxOrgsFormPrice, BxPaymentFormCommissions, BxPaymentFormDetails, BxPaymentFormInvoices, BxPaymentFormView, BxPersonsFormEntry, BxPhotosFormEntry, BxPhotosFormUpload, BxPollsFormEntry, BxPostsFormEntry, BxPostsFormPoll, BxReviewsFormEntry, BxReviewsFormPoll, BxShopifyFormEntry, BxShopifyFormSettings, BxSnipcartFormEntry, BxSnipcartFormSettings, BxSpacesFormEntry, BxSpacesFormPrice, BxStrmFormEntry, BxTasksFormEntry, BxTasksFormListEntry, BxTemplCmtsForm, BxTemplCmtsReviewsForm, BxTemplFormAccount, BxTemplFormConfirmEmail, BxTemplFormConfirmPhone, BxTemplFormForgotPassword, BxTemplFormLogin, BxTemplFormProfile, BxTemplFormView, BxTemplFormView, BxTemplFormWiki, BxTemplPrivacyFormGroupCustom, BxTemplStudioFormView, BxTimelineFormPost, BxTimelineFormRepost, and BxVideosFormEntry.

Member Function Documentation

◆ genForm()

BxBaseFormView::genForm ( )

Generate the whole form

Returns
string

Reimplemented in BxDolFormNestedGhost.

◆ genInput()

BxBaseFormView::genInput ( & $aInput)

Generate HTML Input Element

Parameters
array$aInput
Returns
string Output HTML Code

Reimplemented in BxBaseSearchExtendedForm, BxBaseStudioFormView, and BxVideosFormEntry.

◆ genInputButton()

BxBaseFormView::genInputButton ( & $aInput)

Generate Button Input Element

Parameters
array$aInput
Returns
string

◆ genInputCheckboxSet()

BxBaseFormView::genInputCheckboxSet ( & $aInput)

Generate Checkbox Set Element

Parameters
array$aInput
Returns
string

Reimplemented in BxBaseStudioFormView.

◆ genInputFile()

BxBaseFormView::genInputFile ( & $aInput)

Generate Browse File Element

Parameters
array$aInput
Returns
string

◆ genInputFiles()

BxBaseFormView::genInputFiles ( & $aInput,
$sInfo = '',
$sError = '' )

Generate Select Box Element

Parameters
array$aInput
Returns
string

◆ genInputRadioSet()

BxBaseFormView::genInputRadioSet ( & $aInput)

Generate Radiobuttons Set Element

Parameters
array$aInput
Returns
string

◆ genInputSelect()

BxBaseFormView::genInputSelect ( & $aInput)

Generate Select Element

Parameters
array$aInput
Returns
string

◆ genInputSelectBox()

BxBaseFormView::genInputSelectBox ( & $aInput,
$sInfo = '',
$sError = '' )

Generate Select Box Element

Parameters
array$aInput
Returns
string

◆ genInputSelectMultiple()

BxBaseFormView::genInputSelectMultiple ( & $aInput)

Generate Multiple Select Element

Parameters
array$aInput
Returns
string

◆ genInputSelectRgb()

BxBaseFormView::genInputSelectRgb ( & $aInput)

Generate Select RGB Element

Parameters
array$aInput
Returns
string

◆ genInputStandard()

BxBaseFormView::genInputStandard ( & $aInput)

Generate standard Input Element

Parameters
array$aInput
Returns
string

Reimplemented in BxDolFormNested.

◆ genInputSwitcher()

BxBaseFormView::genInputSwitcher ( & $aInput)

Generate Switcher Input Element (based on checkbox)

Parameters
array$aInput
Returns
string

Reimplemented in BxTemplFormView.

◆ genInputTextarea()

BxBaseFormView::genInputTextarea ( & $aInput)

Generate Textarea Element

Parameters
array$aInput
Returns
string

◆ genLabel()

BxBaseFormView::genLabel ( & $aInput)

Generate Label Element

Parameters
string$aInputinput array
Returns
string HTML code

Reimplemented in BxBaseFormWiki.

◆ genRow()

BxBaseFormView::genRow ( & $aInput)

Generate single Table Row

Parameters
array$aInput
Returns
string

◆ genRowBlockHeader()

BxBaseFormView::genRowBlockHeader ( & $aInput)

Generate Block Headers row

Parameters
array$aInput
Returns
string

◆ genRowCustom()

BxBaseFormView::genRowCustom ( & $aInput,
$sCustomMethod )

Generate custom row

Parameters
array$aInput
string$sCustomMethodcustom method to generate code for input
Returns
string

◆ genRows()

BxBaseFormView::genRows ( )

Generate Table HTML code

Returns
string

◆ genRowStandard()

BxBaseFormView::genRowStandard ( & $aInput,
$isOneLine = false )

Generate standard row

Parameters
array$aInput
Returns
string

◆ genViewRow()

BxBaseFormView::genViewRow ( & $aInput)

Generate single Table Row for view mode

Parameters
array$aInput
Returns
string

◆ genViewRowValue()

BxBaseFormView::genViewRowValue ( & $aInput)

Generate value for view mode row

Parameters
array$aInput
Returns
string

Reimplemented in BxBaseModGeneralFormEntry, and BxEventsFormEntry.

◆ genViewRowWrapped()

BxBaseFormView::genViewRowWrapped ( & $aInput)

Generate complete wrapped row for view mode form

Parameters
array$aInput
Returns
string

Reimplemented in BxBaseModGeneralFormEntry.

◆ getCode()

BxBaseFormView::getCode ( $bDynamicMode = false)

Return Form code

Parameters
$bDynamicMode- set it to true if form is added via JS/AJAX call, for example form in AJAX popup.
Returns
string

Hooks:

'system', 'form_output' - hook to override form object and/or code to be output

  • $unit_name - equals system
  • $action - equals form_output
  • $object_id - not used
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:
    • dynamic - [boolean] is dynamic mode
    • object - [object] by ref, an instance of form class,
      See also
      BxDolForm, can be overridden in hook processing
    • code - [boolean] or [string] by ref, when false the default generation mechanism will be used, can be overridden in hook processing
    • include - [string] by ref, additional data to be attached to output, can be overridden in hook processing
      HOOKS
      'system', 'form_output' - hook to override form object and/or code to be output

Reimplemented in BxAclFormPrice, BxAdsFormEntry, BxAdsFormOffer, BxBaseModGeneralFormEntry, BxBaseModTextFormEntry, BxClssFormEntry, BxDonationsFormType, BxElsFormManage, BxEventsFormEntry, BxMarketFormEntry, BxPollsFormEntry, and BxTasksFormEntry.

◆ getCodeAPI()

BxBaseFormView::getCodeAPI ( )

Hooks:

'system', 'form_output_api' - hook to override form object and/or code to be output. Is used in API calls.

◆ getHtmlEditorQueryParams()

BxBaseFormView::getHtmlEditorQueryParams ( $aInput)

Hooks:

'system', 'editor_query_params' - hook to override http(s) request's query params, which is used in HTML editor

Reimplemented in BxBaseCmtsForm, and BxBaseModGeneralFormEntry.

◆ getInputId()

BxBaseFormView::getInputId ( & $aInput)

Generate new Input Element id

Parameters
array$aInput
Returns
string

Member Data Documentation

◆ $_aCss

BxBaseFormView::$_aCss = array()
protected

CSS files list for form

◆ $_aJs

BxBaseFormView::$_aJs = array()
protected

JS files list for form

◆ $_bAbsoluteActionUrl

BxBaseFormView::$_bAbsoluteActionUrl = false
protected

Use absolute Action URL which is needed in Ajax Mode.

◆ $_bAjaxMode

BxBaseFormView::$_bAjaxMode = false
protected

Form is submitted dynamically (using Ajax Submit).

◆ $_bDynamicMode

BxBaseFormView::$_bDynamicMode = false
protected

Form is added dynamically.

◆ $_bShowEmptySections

BxBaseFormView::$_bShowEmptySections = false
protected

Show or not sections which have no fileds

◆ $_bViewMode

BxBaseFormView::$_bViewMode = false
protected

Form is displayed in view mode.

◆ $_isSectionOpened

BxBaseFormView::$_isSectionOpened = false
protected

for internal use only

◆ $_sCodeAdd

BxBaseFormView::$_sCodeAdd = ''
protected

Code which will be added to the beginning of the form. For example, hidden inputs. For internal use only

◆ $_sDivider

BxBaseFormView::$_sDivider = '<span class="bx-def-margin-left"></span>'
protected

Default divider for several inputs

◆ $_sDividerAlt

BxBaseFormView::$_sDividerAlt = '<br />'
protected

Alternative divider for several inputs

◆ $_sSectionClose

BxBaseFormView::$_sSectionClose = 'getCloseSection'
protected

Function name for generation close form section HTML.

◆ $_sSectionOpen

BxBaseFormView::$_sSectionOpen = 'getOpenSection'
protected

Function name for generation open form section HTML.

◆ $bEnableErrorIcon

BxBaseFormView::$bEnableErrorIcon = true
protected

Enable or disable error message displaying

◆ $sCode

BxBaseFormView::$sCode
protected

HTML Code of this form


The documentation for this class was generated from the following file: