Column Configuration

The class can be accessed from any Model, or Fieldset class. It gives access to the each column metadata that was derrived from the projects main Idea file. This can be used to dynamically generate code.

active

Returns if this column is an column. Active columns will be make the rows in the table restorable, in that when the row is deleted, it will be marked as inactive instead of being actually removed from the database. In turn the row can be set to active again to make it part of the system again.

Schema Example

Copy

Code Example

Copy

assertions

Returns a list of validation metadata to be used to validate this column. You can find all the validation attributes in the Schema Specifications.

Schema Example

Copy

Code Example

Copy

attributes

A of attributes extracted from the file. You can use this for other arbitrary attributes that are not used by the class.

Schema Example

Copy

Code Example

Copy
Copy
Copy

clen

Calculates the character length of the column. Defaults to . This is useful for columns converting to in SQL.

Schema Example

Copy

Code Example

Copy

dash

Returns the dashed version of the column name.
Copy
Copy

enum

Returns the associated with this column or if the column is not an .

Schema Example

Copy

Code Example

Copy

encrypted

Returns if this column has an attribute. Encrypted columns will automatically be encrypted when inserted into the database and decrypted when read from the database.

Schema Example

Copy

Code Example

Copy

field

Returns a field object. Field columns are used in the create and update forms. You can find all the field attributes in the Schema Specifications.

Schema Example

Copy

Code Example

Copy

fieldset

Returns the fieldset associated with this column or if the column is not a fieldset.

Schema Example

Copy

Code Example

Copy

filter

Returns a filter object. Filter columns are used in the search filter form. You can find all the filter attributes in the Schema Specifications.

Schema Example

Copy

Code Example

Copy

hash

Returns if this column has a attribute. Hash columns will automatically be encrypted when inserted into the database. This is a one-way hash.

Schema Example

Copy

Code Example

Copy

id

Returns if this column has an attribute.

Schema Example

Copy

Code Example

Copy

indexable

Returns if the column has either the , , or attribute.

Schema Example

Copy
Copy
Copy

Code Example

Copy

label

Returns the value from the attribute. If none set, will return the column name.

Schema Example

Copy

Code Example

Copy

list

Returns a list object. Listable columns are used in the search results. You can find all the list attributes in the Schema Specifications.

Schema Example

Copy

Code Example

Copy

max

Returns the value from the attribute.

Schema Example

Copy

Code Example

Copy

min

Returns the value from the attribute.

Schema Example

Copy

Code Example

Copy

model

Returns the model associated with this column or if the column is not a model.

Schema Example

Copy

Code Example

Copy

multiple

Returns if this column has an attribute.

Schema Example

Copy

Code Example

Copy

name

Returns the name of the column.
Copy

related

Returns a list of relation objects collected from other models referencing this column. This is useful for generating the reverse relations for this column.

Schema Example

Copy

Code Example

Copy

relation

Returns a relation objects. This is useful for generating the relations for this column.

Schema Example

Copy

Code Example

Copy

required

Returns if this column is required.

Schema Example

Copy
Copy

Code Example

Copy

searchable

Returns if this column has a attribute.

Schema Example

Copy

Code Example

Copy

schema

Returns information on how this column should look like in a database schema. This is useful for generating the database schema and migration files.
Copy

sortable

Returns if this column has a attribute.

Schema Example

Copy

Code Example

Copy

snake

Returns the snake version of the column name.
Copy
Copy

span

Returns a span object. Span columns are used in the search filter form. You can find all the span attributes in the Schema Specifications.

Schema Example

Copy

Code Example

Copy

step

Returns the value from the attribute.

Schema Example

Copy

Code Example

Copy

title

Returns the title version of the column name.
Copy
Copy

type

Returns the type of the column.

Schema Example

Copy

Code Example

Copy

typemap

Returns a map of types for this column.

Schema Example

Copy

Code Example

Copy

unique

Returns if this column has a attribute.

Schema Example

Copy

Code Example

Copy

view

Returns a view object. Viewable columns are used in the detail page. You can find all the view attributes in the Schema Specifications.

Schema Example

Copy

Code Example

Copy

zindex

Returns the value from the attribute. This is used to set the z-index of the column in the UI to control the overlap with other columns.

Schema Example

Copy

Code Example

Copy

assert()

Asserts a value and returns an error. If no errors, will return .
Copy

attribute()

Returns the value of the given attribute name.

Schema Example

Copy

Code Example

Copy
Copy
Copy

serialize()

Serializes value to be inserted into the database
Copy
Copy

unserialize()

Unserializes value coming from the database.
Copy
Copy