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 | Type | Description |
---|---|---|
$content | mixed |
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 | Type | Description |
---|---|---|
$content | string |
string
|
Returns
array
protected
getThumbForImage ($image, array $params = []
)
Helper to get the perfect sized image.
Parameters
Property | Type | Description |
---|---|---|
$image | mixed |
mixed
|
$params | array |
array
|
Returns
mixed
Copyright © 2024 Winter CMS