Adds default element loading to standard form
package | Gems |
---|---|
subpackage | User |
copyright | Copyright (c) 2012 Erasmus MC |
license | New BSD License |
since | Class available since version 1.5 |
inherited_from | \Gems_Form_AutoLoadFormAbstract |
_(string $text, string|\Zend_Locale $locale = null
) : string
Translates the given string returns the translation
string
Translation string
string
\Zend_Locale
(optional) Locale/Language to use, identical with locale identifier, @see \Zend_Locale for more information
string
__construct(mixed $options = null
) : void
Registers form view helper as decorator
mixed
activateBootstrap()
activateJQuery() : \MUtil_Form
\MUtil_Form
(continuation pattern)addButtons(mixed $links)
mixed
addElement(string|\Zend_Form_Element $element, string $name= null
, array|\Zend_Config $options= null
) : \Zend_Form
$element may be either a string element type, or an object of type \Zend_Form_Element. If a string element type is provided, $name must be provided, and $options may be optionally provided for configuring the element.
If a \Zend_Form_Element is provided, $name may be optionally provided, and any provided $options will be ignored.
string
\Zend_Form_Element
string
array
\Zend_Config
\Zend_Form_Exception |
on invalid element |
---|
\Zend_Form
(continuation pattern)afterRegistry() : void
This function is no needed if the classes are setup correctly
inherited_from | \Gems_Form_AutoLoadFormAbstract::afterRegistry() |
---|
afterRegistry() : void
checkRegistryRequestsAnswers() : boolean
boolean
False if required values are missing.getAskCheck() : boolean
boolean
getAskOld() : boolean
boolean
getAutoSubmit() : array
array
or nullgetLoadDefault($loadDefault = true
) : boolean
boolean
$loadDefaultgetNewPasswordElement() : \Zend_Form_Element_Password
\Zend_Form_Element_Password
getOldPasswordElement() : \Zend_Form_Element_Password
\Zend_Form_Element_Password
getRepeatPasswordElement() : \Zend_Form_Element_Password
\Zend_Form_Element_Password
getReportNoEnforcementElement() : \MUtil_Form_Element_Html
\MUtil_Form_Element_Html
getReportRulesElement() : \MUtil_Form_Element_Html
\MUtil_Form_Element_Html
getSubmitButton() : \Zend_Form_Element_Submit
\Zend_Form_Element_Submit
getSubmitButtonLabel() : string
inherited_from | \Gems_Form_AutoLoadFormAbstract::getSubmitButtonLabel() |
---|
string
getSubmitButtonLabel() : string
string
getUser() : \Gems_User_User
inherited_from | \Gems_User_Validate_GetUserInterface::getUser() |
---|
\Gems_User_User
hasRuleEnforcement() : boolean
boolean
isAutoSubmit() : boolean
boolean
isValid(array $data, boolean $disableTranslateValidators = null
) : boolean
As it is better for translation utilities to set the labels etc. translated, the MUtil default is to disable translation.
However, this also disables the translation of validation messages, which we cannot set translated. The MUtil form is extended so it can make this switch.
array
boolean
Extra switch
boolean
loadDefaultElements() : \Gems_User_Form_LoginForm
inherited_from | \Gems_Form_AutoLoadFormAbstract::loadDefaultElements() |
---|
\Gems_User_Form_LoginForm
(continuation pattern)loadDefaultElements() : \Gems_Form_AutoLoadFormAbstract
\Gems_Form_AutoLoadFormAbstract
(continuation pattern)plural(string $singular, string $plural, integer $number, string|\Zend_Locale $locale = null
) : string
Translates the given string using plural notations Returns the translated string
see |
---|
string
Singular translation string
string
Plural translation string
integer
Number for detecting the correct plural
string
\Zend_Locale
(Optional) Locale/Language to use, identical with locale identifier, @see \Zend_Locale for more information
string
setAskCheck(boolean $askCheck = true
) : \Gems_User_Form_ChangePasswordForm
Enables loading of parameter through \Zend_Form::__construct()
boolean
\Gems_User_Form_ChangePasswordForm
(continuation pattern)setAskOld(boolean $askOld = true
) : \Gems_User_Form_ChangePasswordForm
Enables loading of parameter through \Zend_Form::__construct()
boolean
\Gems_User_Form_ChangePasswordForm
(continuation pattern)setAutoSubmit(mixed $submitUrl, mixed $targetId, $selective = false
)
mixed
Url as \MUtil_Html_UrlArrayAttribute, array or string
mixed
Id of html element whose content is replaced by the submit result: \MUtil_Html_ElementInterface or string
setCheckFields(array $checkFields) : \Gems_User_Form_ChangePasswordForm
Enables loading of parameter through \Zend_Form::__construct()
array
Of 'label name' => 'required values' or \Zend_Form_Element elements
\Gems_User_Form_ChangePasswordForm
(continuation pattern)setForceRules(boolean $forceRules = true
) : \Gems_User_Form_ChangePasswordForm
Enables loading of parameter through \Zend_Form::__construct()
boolean
\Gems_User_Form_ChangePasswordForm
(continuation pattern)setLoadDefault(boolean $loadDefault = true
) : \Gems_User_Form_LoginForm
Enables loading of parameter through \Zend_Form::__construct()
boolean
\Gems_User_Form_LoginForm
(continuation pattern)setReportRules(boolean $reportRules = true
) : \Gems_User_Form_ChangePasswordForm
Enables loading of parameter through \Zend_Form::__construct()
boolean
\Gems_User_Form_ChangePasswordForm
(continuation pattern)setUseTableLayout(boolean $useTableLayout = true
) : \Gems_User_Form_ChangePasswordForm
Enables loading of parameter through \Zend_Form::__construct()
boolean
\Gems_User_Form_ChangePasswordForm
(continuation pattern)setUser(\Gems_User_User $user) : \Gems_User_Form_ChangePasswordForm
Enables loading of parameter through \Zend_Form::__construct()
\Gems_User_User
\Gems_User_Form_ChangePasswordForm
(continuation pattern)wasSubmitted() : boolean
boolean
_activateJQueryView(\Zend_View_Interface $view = null
)
addCheckFields() : void
initTranslateable()
This function is not needed if the variables have been defined correctly in the source for this object and theose variables have been applied.
return @void
_enableAutoSubmitElement(mixed $element)
Call only when $_autoSubmit is set
mixed
$_autosubmit : array
null
$_newPasswordFieldName : string
'new_password'
$_oldPasswordFieldName : string
'old_password'
$_repeatPasswordFieldName : string
'repeat_password'
$_reportNoEnforcementFieldName : string
'report_no_enforcement'
$_reportRulesFieldName : string
'report_rules'
$_submitFieldName : string
'button'
$_table : \MUtil_Html_TableElements
$askCheck : boolean
false
$askOld : boolean
null
Calculated when null
$checkFields
array()
Default is asking for the username but you can e.g. ask for someones birthday.
return | Of 'label name' => 'required values' or \Zend_Form_Element elements |
---|
$forceRules : boolean
true
$loadDefault : boolean
true
$reportRules : boolean
true
$translate : \Zend_Translate
inherited_from | \Gems_Form_AutoLoadFormAbstract::translate |
---|
$translate : \Zend_Translate
$translateAdapter : \Zend_Translate_Adapter
$useTableLayout : boolean
false
$user : \Gems_User_User