SyntaxModelTrait for use in models

Public methods

public static void bootSyntaxModelTrait()

public void defineSyntaxRelations()

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

public void getFormSyntaxData()

Prepare the syntax field data for saving.

public array getFormSyntaxFields()

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

public int getSyntaxData()

Get value of the model syntax_data column.

public string getSyntaxDataColumnName()

Get data column name.

public int getSyntaxFields()

Get value of the model syntax_fields column.

public string getSyntaxFieldsColumnName()

Get fields column name.

public void getSyntaxParser($content)
  • $content

public array makeSyntaxFields(string $content)

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.

  • string $content

Protected methods

protected void getThumbForImage($image, $params=array())

Helper to get the perfect sized image.

  • $image
  • $params