October\Rain\Parse\Syntax\SyntaxModelTrait

Overview

SyntaxModelTrait for use in models


Public Methods

public static bootSyntaxModelTrait()

public static bootSyntaxModelTrait(): void

public defineSyntaxRelations()

public defineSyntaxRelations(): void 

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

public getFormSyntaxData()

public getFormSyntaxData(): void

getFormSyntaxData prepares the syntax field data for saving.

public getFormSyntaxFields()

public getFormSyntaxFields(): array 

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

public getSyntaxData()

public getSyntaxData(): int 

Get value of the model syntax_data column.

public getSyntaxDataColumnName()

public getSyntaxDataColumnName(): string 

Get data column name.

public getSyntaxFields()

public getSyntaxFields(): int 

Get value of the model syntax_fields column.

public getSyntaxFieldsColumnName()

public getSyntaxFieldsColumnName(): string 

Get fields column name.

public getSyntaxParser()

public getSyntaxParser($content): void

public makeSyntaxFields()

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.

Protected Methods

protected getThumbForImage()

protected getThumbForImage($image, $params = []): void

getThumbForImage helper to get the perfect sized image.