FormModelWidget

Form Model Widget Trait

 trait Backend\Traits\FormModelWidget

Special logic for for form widgets that use a database stored model.

Methods

public getRelationModel () : Winter\Storm\Database\Model

Returns the model of a relation type, supports nesting via HTML array.

Returns
Winter\Storm\Database\Model

public resolveModelAttribute (string $attribute) : array

Returns the final model and attribute name of a nested HTML array attribute.

Eg: list($model, $attribute) = $this->resolveModelAttribute($this->valueFrom);

Parameters
Property Description
$attribute
string
Returns
array

protected getRelationObject () : Relation

Returns the value as a relation object from the model, supports nesting via HTML array.

Returns

protected getRelationType () : string | null

Returns the value as a relation type from the model, supports nesting via HTML array.

Returns
string | null

Used by

Class Description
FileUpload

File upload field Renders a form file uploader field.

RecordFinder

Record Finder Renders a record finder field.

Relation

Form Relationship Renders a field prepopulated with a belongsTo and belongsToHasMany relation.

TagList

Tag List Form Widget

Copyright © 2024 Winter CMS