BaseWidget extends VisualItem
Description of BaseWidget
Table of Contents
$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 |
$token | string | |
$uniqueId | int | |
__construct() | mixed | |
edit() | string | |
getType() | Get the widget type | string |
gridFormat() | array | |
inputHidden() | string | |
plainText() | string | |
processFormData() | mixed | |
setCustomValue() | Set custom fixed value to widget | mixed |
showTableTotals() | bool | |
tableCell() | string | |
assets() | Adds assets to the asset manager. | mixed |
inputHtml() | string | |
inputHtmlExtraParams() | string | |
loadOptions() | mixed | |
onclickHtml() | string | |
readonly() | bool | |
setValue() | mixed | |
show() | string | |
tableCellClass() | string | |
__construct() | mixed | |
getLevel() | int | |
getToken() | string | |
setLevel() | mixed | |
setToken() | 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
$autocomplete
public
bool
$autocomplete
$fieldname
public
string
$fieldname
$icon
public
string
$icon
$onclick
public
string
$onclick
$options
public
array
$options
= []
$readonly
public
string
$readonly
$required
public
bool
$required
$type
private
string
$type
$value
protected
mixed
$value
$class
public
string
$class
$i18n
protected
static Translator
$i18n
$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
$token
private
static string
$token
= ''
$uniqueId
protected
static int
$uniqueId
= -1
Methods
__construct()
public
__construct(
$data :
array
)
: mixed
Parameters
- $data : array
Return values
mixededit()
public
edit(
$model :
object
[, $title :
string
= '' ]
[, $description :
string
= '' ]
[, $titleurl :
string
= '' ]
)
: string
Parameters
- $model : object
- $title : string = ''
- $description : string = ''
- $titleurl : string = ''
Return values
stringgetType()
Get the widget type
public
getType(
)
: string
Return values
stringgridFormat()
public
gridFormat(
)
: array
Return values
arrayinputHidden()
public
inputHidden(
$model :
object
)
: string
Parameters
- $model : object
Return values
stringplainText()
public
plainText(
$model :
object
)
: string
Parameters
- $model : object
Return values
stringprocessFormData()
public
processFormData(
&$model :
object
, $request :
Request
)
: mixed
Parameters
- $model : object
- $request : Request
Return values
mixedsetCustomValue()
Set custom fixed value to widget
public
setCustomValue(
$value :
mixed
)
: mixed
Parameters
- $value : mixed
Return values
mixedshowTableTotals()
public
showTableTotals(
)
: bool
Return values
booltableCell()
public
tableCell(
$model :
object
[, $display :
string
= 'left' ]
)
: string
Parameters
- $model : object
- $display : string = 'left'
Return values
stringassets()
Adds assets to the asset manager.
protected
assets(
)
: mixed
Return values
mixedinputHtml()
protected
inputHtml(
[ $type :
string
= 'text' ]
[, $extraClass :
string
= '' ]
)
: string
Parameters
- $type : string = 'text'
- $extraClass : string = ''
Return values
stringinputHtmlExtraParams()
protected
inputHtmlExtraParams(
)
: string
Return values
stringloadOptions()
protected
loadOptions(
$children :
array
)
: mixed
Parameters
- $children : array
Return values
mixedonclickHtml()
protected
onclickHtml(
$inside :
string
[, $titleurl :
string
= '' ]
)
: string
Parameters
- $inside : string
- $titleurl : string = ''
Return values
stringreadonly()
protected
readonly(
)
: bool
Return values
boolsetValue()
protected
setValue(
$model :
object
)
: mixed
Parameters
- $model : object
Return values
mixedshow()
protected
show(
)
: string
Return values
stringtableCellClass()
protected
tableCellClass(
[ $initialClass :
string
= '' ]
[, $alternativeClass :
string
= '' ]
)
: string
Parameters
- $initialClass : string = ''
- $alternativeClass : string = ''
Return values
string__construct()
public
__construct(
$data :
array
)
: mixed
Parameters
- $data : array
Return values
mixedgetLevel()
public
static getLevel(
)
: int
Return values
intgetToken()
public
static getToken(
)
: string
Return values
stringsetLevel()
public
static setLevel(
$new :
int
)
: mixed
Parameters
- $new : int
Return values
mixedsetToken()
public
static setToken(
$token :
string
)
: mixed
Parameters
- $token : string
Return values
mixedcolorToClass()
protected
colorToClass(
$color :
string
, $prefix :
string
)
: string
Parameters
- $color : string
- $prefix : string
Return values
stringgetColorFromOption()
Calculate color from option configuration
public
getColorFromOption(
$option :
string[]
, $value :
mixed
, $prefix :
string
)
: string
Parameters
- $option : string[]
- $value : mixed
- $prefix : string
Return values
stringapplyOperatorFromOption()
protected
applyOperatorFromOption(
$option :
string[]
, $value :
mixed
)
: bool
Parameters
- $option : string[]
- $value : mixed
Return values
boolcombineClasses()
protected
combineClasses(
...$classes :
array
)
: string
Parameters
- $classes : array
Return values
stringcss()
Returns equivalent css class to $class. To extend in plugins.
protected
css(
$class :
string
)
: string
Parameters
- $class : string
Return values
stringgetUniqueId()
protected
getUniqueId(
)
: int