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 | Type | Description |
---|---|---|
$attribute | string |
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
Copyright © 2023 Winter CMS