Свойство | Тип | Описание | |
---|---|---|---|
$arrAttributes | array | Attributes | |
$arrConfiguration | array | Configuration | |
$arrErrors | array | Errors | |
$arrOptions | array | Options | |
$blnForAttribute | boolean | For attribute indicator | |
$blnSubmitInput | boolean | Submit indicator | |
$objDca | object | Data container | |
$strClass | string | CSS class | |
$strId | integer | Id | |
$strLabel | string | Label | |
$strName | string | Name | |
$strPrefix | string | CSS class prefix | |
$strWizard | string | Wizard | |
$varValue | mixed | Value |
Метод | Описание | |
---|---|---|
__construct ( array $arrAttributes = null ) | Initialize the object | |
__get ( string $strKey ) : string | Return an object property | |
__isset ( string $strKey ) : boolean | Check whether an object property exists | |
__set ( string $strKey, mixed $varValue ) | Set an object property | |
addAttribute ( string $strName, mixed $varValue ) | Add an attribute | |
addAttributes ( array $arrAttributes ) | Take an associative array and add it to the object's attributes | |
addError ( string $strError ) | Add an error message | |
generate ( ) : string | Generate the widget and return it as string | |
generateLabel ( ) : string | Generate the label and return it as string | |
generateWithError ( boolean $blnSwitchOrder = false ) : string | Generate the widget with error message and return it as string | |
getAttribute ( string $strKey ) : string | Return a single attribute | |
getAttributes ( array $arrStrip = [] ) : string | Return all attributes as string | |
getAttributesFromDca ( array $arrData, string $strName, mixed $varValue = null, string $strField = '', string $strTable = '', |
Extract the Widget attributes from a Data Container array | |
getEmptyStringOrNull ( ) : string | integer | null | Return either an empty string or null based on the SQL string | |
getEmptyStringOrNullByFieldType ( string $sql ) : string | null | Return either an empty string or null based on the SQL string | |
getEmptyValue ( ) : string | integer | null | Return the empty value based on the SQL string | |
getEmptyValueByFieldType ( string $sql ) : string | integer | null | Return the empty value based on the SQL string | |
getErrorAsHTML ( integer $intIndex ) : string | Return a particular error as HTML string | |
getErrorAsString ( integer $intIndex ) : string | Return a particular error as string | |
getErrors ( ) : array | Return the errors array | |
getErrorsAsString ( string $strSeparator = null ) : string | Return all errors as string separated by a given separator | |
hasErrors ( ) : boolean | Return true if the widget has errors | |
optionChecked ( string $strOption, mixed $varValues ) : string | Return a "checked" attribute if the option is checked | |
optionSelected ( string $strOption, mixed $varValues ) : string | Return a "selected" attribute if the option is selected | |
parse ( array $arrAttributes = null ) : string | Parse the template file and return it as string | |
submitInput ( ) : boolean | Return true if the widgets submits user input | |
validate ( ) | Validate the user input and set the value |
Метод | Описание | |
---|---|---|
addSubmit ( ) : string | Generate a submit button | |
getPost ( string $strKey ) : mixed | Find and return a $_POST variable | |
isChecked ( array $arrOption ) : string | Check whether an option is checked | |
isSelected ( array $arrOption ) : string | Check whether an option is selected | |
isValidOption ( mixed $varInput ) : boolean | Check whether an input is one of the given options | |
validator ( mixed $varInput ) : mixed | Recursively validate an input variable |
public __construct ( array $arrAttributes = null ) | ||
$arrAttributes | array | An optional attributes array |
public addAttribute ( string $strName, mixed $varValue ) | ||
$strName | string | The attribute name |
$varValue | mixed | The attribute value |
public addAttributes ( array $arrAttributes ) | ||
$arrAttributes | array | An array of attributes |
public generateLabel ( ) : string | ||
Результат | string | The label markup |
public generateWithError ( boolean $blnSwitchOrder = false ) : string | ||
$blnSwitchOrder | boolean | If true, the error message will be shown below the field |
Результат | string | The form field markup |
public getAttribute ( string $strKey ) : string | ||
$strKey | string | The attribute name |
Результат | string | The attribute markup |
public getAttributes ( array $arrStrip = [] ) : string | ||
$arrStrip | array | An optional array with attributes to strip |
Результат | string | The attributes string |
public static getAttributesFromDca ( array $arrData, string $strName, mixed $varValue = null, string $strField = '', string $strTable = '', |
||
$arrData | array | The field configuration array |
$strName | string | The field name in the form |
$varValue | mixed | The field value |
$strField | string | The field name in the database |
$strTable | string | The table name in the database |
$objDca | An optional DataContainer object | |
Результат | array | An attributes array that can be passed to a widget |
public getErrorAsHTML ( integer $intIndex ) : string | ||
$intIndex | integer | The message index |
Результат | string | The HTML markup of the corresponding error message |
public getErrorAsString ( integer $intIndex ) : string | ||
$intIndex | integer | The message index |
Результат | string | The corresponding error message |
public getErrorsAsString ( string $strSeparator = null ) : string | ||
$strSeparator | string | An optional separator (defaults to " ") |
Результат | string | The error messages string |
protected isSelected ( array $arrOption ) : string | ||
$arrOption | array | The options array |
Результат | string | The "selected" attribute or an empty string |
protected isValidOption ( mixed $varInput ) : boolean | ||
$varInput | mixed | The input string or array |
Результат | boolean | True if the selected option exists |
public submitInput ( ) : boolean | ||
Результат | boolean | True if the widget submits user input |
protected array $arrConfiguration | ||
Результат | array |
protected bool $blnForAttribute | ||
Результат | boolean |
protected bool $blnSubmitInput | ||
Результат | boolean |