FacturaScripts

WidgetAutocomplete extends WidgetSelect

Description of WidgetAutocomplete

Table of Contents

$fieldfilter Name of the field by which it is filtered. string
$selected Descriptive text of the selected value string
$strict Indicates whether a value should be selected strictly from the list of values or whether the user can enter a new or different value from the list. bool
$codeModel CodeModel
$fieldcode string
$fieldtitle string
$source string
$translate bool
$values array
$autocomplete bool
$fieldname string
$icon string
$onclick string
$options array
$readonly string
$required bool
$type string
$value mixed
$class string
$i18n Translator
$id Identifies the object with a defined name in the view string
$level Selected security level. int
$name Name defined in the view as key string
$uniqueId int
edit() string
setSelected() Set a descriptive text for the selected value mixed
getSelected() Get the descriptive text of the selected value string
assets() Adds assets to the asset manager. mixed
inputGroupClearBtn() string
inputHtml() string
setSourceData() Set datasource data and Load data from Model into values array mixed
strictStr() string
__construct() mixed
getDataSource() Obtains the configuration of the datasource used in obtaining data array
processFormData() mixed
setValuesFromArray() Loads the value list from a given array. mixed
setValuesFromArrayKeys() mixed
setValuesFromCodeModel() Loads the value list from an array with value and title (description) mixed
setValuesFromRange() mixed
applyTranslations() Translate the fixed titles, if they exist mixed
inputHtml() string
setSourceData() Set datasource data and Load data from Model into values array. mixed
show() string
edit() string
getType() Get the widget type string
gridFormat() array
inputHidden() string
plainText() string
setCustomValue() Set custom fixed value to widget mixed
showTableTotals() bool
tableCell() string
assets() Adds assets to the asset manager. mixed
inputHtmlExtraParams() string
loadOptions() mixed
onclickHtml() string
readonly() bool
setValue() mixed
tableCellClass() string
getLevel() int
setLevel() mixed
colorToClass() string
getColorFromOption() Calculate color from option configuration string
applyOperatorFromOption() bool
combineClasses() string
css() Returns equivalent css class to $class. To extend in plugins. string
getUniqueId() int

Properties

$fieldfilter

Name of the field by which it is filtered.

protected string $fieldfilter

$selected

Descriptive text of the selected value

protected string $selected = null

$strict

Indicates whether a value should be selected strictly from the list of values or whether the user can enter a new or different value from the list.

public bool $strict = true

$id

Identifies the object with a defined name in the view

public string $id

$level

Selected security level.

private static int $level = ""

$name

Name defined in the view as key

public string $name

Methods

edit()

public edit( $model : object [, $title : string = '' ] [, $description : string = '' ] [, $titleurl : string = '' ] ) : string
Parameters
$model : object
$title : string = ''
$description : string = ''
$titleurl : string = ''
Return values
string

setSelected()

Set a descriptive text for the selected value

public setSelected( $text : string ) : mixed
Parameters
$text : string
Return values
mixed

getSelected()

Get the descriptive text of the selected value

protected getSelected( ) : string
Return values
string

assets()

Adds assets to the asset manager.

protected assets( ) : mixed
Return values
mixed

inputGroupClearBtn()

protected inputGroupClearBtn( ) : string
Return values
string

inputHtml()

protected inputHtml( [ $type : string = 'text' ] [, $extraClass : string = 'widget-autocomplete' ] ) : string
Parameters
$type : string = 'text'
$extraClass : string = 'widget-autocomplete'
Return values
string

setSourceData()

Set datasource data and Load data from Model into values array

protected setSourceData( $child : array [, $loadData : bool = true ] ) : mixed
Parameters
$child : array
$loadData : bool = true
Return values
mixed

__construct()

public __construct( $data : mixed ) : mixed
Parameters
$data : mixed
Return values
mixed

getDataSource()

Obtains the configuration of the datasource used in obtaining data

public getDataSource( ) : array
Return values
array

processFormData()

public processFormData( &$model : object , $request : Request ) : mixed
Parameters
$model : object
$request : Request
Return values
mixed

setValuesFromArray()

Loads the value list from a given array.

public setValuesFromArray( $items : array [, $translate : bool = false ] [, $addEmpty : bool = false ] [, $col1 : string = 'value' ] [, $col2 : string = 'title' ] ) : mixed

The array must have one of the two following structures:

  • If it's a value array, it must uses the value of each element as title and value
  • If it's a multidimensional array, the indexes value and title must be set for each element
Parameters
$items : array
$translate : bool = false
$addEmpty : bool = false
$col1 : string = 'value'
$col2 : string = 'title'
Return values
mixed

setValuesFromArrayKeys()

public setValuesFromArrayKeys( $values : array [, $translate : bool = false ] [, $addEmpty : bool = false ] ) : mixed
Parameters
$values : array
$translate : bool = false
$addEmpty : bool = false
Return values
mixed

setValuesFromCodeModel()

Loads the value list from an array with value and title (description)

public setValuesFromCodeModel( $rows : array [, $translate : bool = false ] ) : mixed
Parameters
$rows : array
$translate : bool = false
Return values
mixed

setValuesFromRange()

public setValuesFromRange( $start : int , $end : int , $step : int ) : mixed
Parameters
$start : int
$end : int
$step : int
Return values
mixed

applyTranslations()

Translate the fixed titles, if they exist

private applyTranslations( ) : mixed
Return values
mixed

inputHtml()

protected inputHtml( [ $type : string = 'text' ] [, $extraClass : string = '' ] ) : string
Parameters
$type : string = 'text'
$extraClass : string = ''
Return values
string

setSourceData()

Set datasource data and Load data from Model into values array.

protected setSourceData( $child : array [, $loadData : bool = true ] ) : mixed
Parameters
$child : array
$loadData : bool = true
Return values
mixed

show()

protected show( ) : string
Return values
string

edit()

public edit( $model : object [, $title : string = '' ] [, $description : string = '' ] [, $titleurl : string = '' ] ) : string
Parameters
$model : object
$title : string = ''
$description : string = ''
$titleurl : string = ''
Return values
string

getType()

Get the widget type

public getType( ) : string
Return values
string

gridFormat()

public gridFormat( ) : array
Return values
array

inputHidden()

public inputHidden( $model : object ) : string
Parameters
$model : object
Return values
string

plainText()

public plainText( $model : object ) : string
Parameters
$model : object
Return values
string

setCustomValue()

Set custom fixed value to widget

public setCustomValue( $value : mixed ) : mixed
Parameters
$value : mixed
Return values
mixed

showTableTotals()

public showTableTotals( ) : bool
Return values
bool

tableCell()

public tableCell( $model : object [, $display : string = 'left' ] ) : string
Parameters
$model : object
$display : string = 'left'
Return values
string

assets()

Adds assets to the asset manager.

protected assets( ) : mixed
Return values
mixed

inputHtmlExtraParams()

protected inputHtmlExtraParams( ) : string
Return values
string

loadOptions()

protected loadOptions( $children : array ) : mixed
Parameters
$children : array
Return values
mixed

onclickHtml()

protected onclickHtml( $inside : string [, $titleurl : string = '' ] ) : string
Parameters
$inside : string
$titleurl : string = ''
Return values
string

readonly()

protected readonly( ) : bool
Return values
bool

setValue()

protected setValue( $model : object ) : mixed
Parameters
$model : object
Return values
mixed

tableCellClass()

protected tableCellClass( [ $initialClass : string = '' ] [, $alternativeClass : string = '' ] ) : string
Parameters
$initialClass : string = ''
$alternativeClass : string = ''
Return values
string

getLevel()

public static getLevel( ) : int
Return values
int

setLevel()

public static setLevel( $new : int ) : mixed
Parameters
$new : int
Return values
mixed

colorToClass()

protected colorToClass( $color : string , $prefix : string ) : string
Parameters
$color : string
$prefix : string
Return values
string

getColorFromOption()

Calculate color from option configuration

public getColorFromOption( $option : string[] , $value : mixed , $prefix : string ) : string
Parameters
$option : string[]
$value : mixed
$prefix : string
Return values
string

applyOperatorFromOption()

protected applyOperatorFromOption( $option : string[] , $value : mixed ) : bool
Parameters
$option : string[]
$value : mixed
Return values
bool

combineClasses()

protected combineClasses( ...$classes : array ) : string
Parameters
$classes : array
Return values
string

css()

Returns equivalent css class to $class. To extend in plugins.

protected css( $class : string ) : string
Parameters
$class : string
Return values
string

getUniqueId()

protected getUniqueId( ) : int
Return values
int

Search results