PHP Class wbraganca\dynamicform\DynamicFormWidget

Author: Wanderson Bragança ([email protected])
Inheritance: extends yii\base\Widget
ファイルを表示 Open project: wbraganca/yii2-dynamicform Class Usage Examples

Public Properties

Property Type Description
$deleteButton string
$formFields fields to be validated.
$formId form ID
$insertButton string
$insertPosition 'bottom' or 'top';
$limit string
$min integer
$model the model used for the form
$widgetBody string
$widgetContainer string
$widgetItem string

Public Methods

Method Description
init ( ) Initializes the widget.
registerAssets ( View $view ) Registers the needed assets.
registerHashVarWidget ( ) : boolean Register the actual widget.
run ( )

Protected Methods

Method Description
getHashVarName ( ) : string Returns the hashed variable.
hashOptions ( ) Generates a hashed variable to store the options.
initOptions ( ) Initializes the widget options.
registerOptions ( View $view ) Registers plugin options by storing it in a hashed javascript variable.

Private Methods

Method Description
removeItems ( string $content ) Clear HTML widgetBody. Required to work with zero or more items.

Method Details

getHashVarName() protected method

Returns the hashed variable.
protected getHashVarName ( ) : string
return string

hashOptions() protected method

Generates a hashed variable to store the options.
protected hashOptions ( )

init() public method

Initializes the widget.
public init ( )

initOptions() protected method

Initializes the widget options.
protected initOptions ( )

registerAssets() public method

Registers the needed assets.
public registerAssets ( View $view )
$view View The View object

registerHashVarWidget() public method

Register the actual widget.
public registerHashVarWidget ( ) : boolean
return boolean

registerOptions() protected method

Registers plugin options by storing it in a hashed javascript variable.
protected registerOptions ( View $view )
$view View The View object

run() public method

public run ( )

Property Details

$deleteButton public_oe property

public string $deleteButton
return string

$formFields public_oe property

fields to be validated.
public $formFields

$formId public_oe property

form ID
public $formId

$insertButton public_oe property

public string $insertButton
return string

$insertPosition public_oe property

'bottom' or 'top';
public $insertPosition

$limit public_oe property

public string $limit
return string

$min public_oe property

public int $min
return integer

$model public_oe property

the model used for the form
public $model

$widgetBody public_oe property

public string $widgetBody
return string

$widgetContainer public_oe property

public string $widgetContainer
return string

$widgetItem public_oe property

public string $widgetItem
return string