FacturaScripts

WidgetAutocomplete extends WidgetAutocomplete
in package

Class created by Core/Base/PluginManager

Tags
author

FacturaScripts [email protected]

Table of Contents

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

Properties

$id

Identifies the object with a defined name in the view

public string $id

$name

Name defined in the view as key

public string $name

$options

public array<string|int, mixed> $options = []

$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

$selected

Descriptive text of the selected value

protected string $selected = null

$level

Selected security level.

private static int $level = 0

Methods

__construct()

public __construct(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>
Return values
mixed

edit()

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

getColorFromOption()

Calculate color from option configuration

public getColorFromOption(array<string|int, string> $option, mixed $value, string $prefix) : string
Parameters
$option : array<string|int, string>
$value : mixed
$prefix : string
Return values
string

getDataSource()

Obtains the configuration of the datasource used in obtaining data

public getDataSource() : array<string|int, mixed>
Return values
array<string|int, mixed>

getLevel()

public static getLevel() : int
Return values
int

getToken()

public static getToken() : string
Return values
string

getType()

Get the widget type

public getType() : string
Return values
string

gridFormat()

public gridFormat() : array<string|int, mixed>
Return values
array<string|int, mixed>

inputHidden()

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

plainText()

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

processFormData()

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

setCustomValue()

Set custom fixed value to widget

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

setLevel()

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

setSelected()

Set a descriptive text for the selected value

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

setToken()

public static setToken(string $token) : mixed
Parameters
$token : string
Return values
mixed

setValuesFromArray()

Loads the value list from a given array.

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

The array must have one of the two following structures:

  • If it's a value array, it must use 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<string|int, mixed>
$translate : bool = false
$addEmpty : bool = false
$col1 : string = 'value'
$col2 : string = 'title'
Return values
mixed

setValuesFromArrayKeys()

public setValuesFromArrayKeys(array<string|int, mixed> $values[, bool $translate = false ][, bool $addEmpty = false ]) : mixed
Parameters
$values : array<string|int, mixed>
$translate : bool = false
$addEmpty : bool = false
Return values
mixed

setValuesFromCodeModel()

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

public setValuesFromCodeModel(array<string|int, mixed> $rows[, bool $translate = false ]) : mixed
Parameters
$rows : array<string|int, mixed>
$translate : bool = false
Return values
mixed

setValuesFromRange()

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

showTableTotals()

public showTableTotals() : bool
Return values
bool

tableCell()

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

applyOperatorFromOption()

protected applyOperatorFromOption(array<string|int, string> $option, mixed $value) : bool
Parameters
$option : array<string|int, string>
$value : mixed
Return values
bool

assets()

Adds assets to the asset manager.

protected assets() : mixed
Return values
mixed

colorToClass()

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

combineClasses()

protected combineClasses(array<string|int, mixed> ...$classes) : string
Parameters
$classes : array<string|int, mixed>
Return values
string

css()

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

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

getSelected()

Get the descriptive text of the selected value

protected getSelected() : string
Return values
string

getUniqueId()

protected getUniqueId() : int
Return values
int

inputGroupClearBtn()

protected inputGroupClearBtn() : string
Return values
string

inputHtml()

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

inputHtmlExtraParams()

protected inputHtmlExtraParams() : string
Return values
string

loadOptions()

protected loadOptions(array<string|int, mixed> $children) : mixed
Parameters
$children : array<string|int, mixed>
Return values
mixed

onclickHtml()

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

readonly()

protected readonly() : bool
Return values
bool

setSourceData()

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

protected setSourceData(array<string|int, mixed> $child[, bool $loadData = true ]) : mixed
Parameters
$child : array<string|int, mixed>
$loadData : bool = true
Return values
mixed

setValue()

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

show()

protected show() : string
Return values
string

tableCellClass()

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

applyTranslations()

Translate the fixed titles, if they exist

private applyTranslations() : mixed
Return values
mixed

Search results