SyntaxModelTrait

 trait Winter\Storm\Parse\Syntax\SyntaxModelTrait

Methods

public static bootSyntaxModelTrait ()

Returns
mixed

public defineSyntaxRelations () : void

Defines any relationships (attachments) that this model will need based on the field definitions.

Returns
void

public getFormSyntaxData ()

Prepare the syntax field data for saving.

Returns
mixed

public getFormSyntaxFields () : array

Prepare the syntax fields for use in a Form builder. The array name is added to each field.

Returns
array

public getSyntaxData () : int

Get value of the model syntax_data column.

Returns
int

public getSyntaxDataColumnName () : string

Get data column name.

Returns
string

public getSyntaxFields () : int

Get value of the model syntax_fields column.

Returns
int

public getSyntaxFieldsColumnName () : string

Get fields column name.

Returns
string

public getSyntaxParser ($content)

Parameters
Property Description
$content
mixed
Returns
mixed

public makeSyntaxFields (string $content) : array

Processes supplied content and extracts the field definitions and default data. It is mixed with the current data and applied to the fields and data attributes.

Parameters
Property Description
$content
string
Returns
array

protected getThumbForImage ($image, array $params = [])

Helper to get the perfect sized image.

Parameters
Property Description
$image
mixed
$params
array
Returns
mixed
Copyright © 2024 Winter CMS