Special types
address
The address type provides multiple fields, specifically intended for postal addresses. The address is presented as an object with following properties:
- street (Supports internationalisation)
- number
- box
- postal
- city (Supports internationalisation)
- coordinates
| Attribute | Type | Description |
|---|---|---|
| name | string|required | Name of the field. |
| required | boolean | When present, the field will not be nullable. |
| unilingual | boolean | When present, support for internationalisation will be disabled. |
adminlock
The adminlock type provides a boolean field, intended for disabling CMS modifications on specific records.
| Attribute | Type | Description |
|---|---|---|
| default | string | The default value for the field. Truthy values are interpreted as true, falsy values as false. |
| delete | string | When this attribute is set to "deny", users will not be able to delete the record in the CMS if the adminlock field is set to _true_. Defaults to "allow". |
| name | string | Name of the field. Defaults to "adminlock". |
| update | string | When this attribute is set to "deny", users will not be able to modify the record in the CMS if the adminlock field is set to _true_. Defaults to "allow". |
content
The content type provides a field intended for content originating from the CMS's WYSIWYG editor. Supports internationalisation by default. Content is provided as an object of class Core\Schema\Types\Content. This objects represents a set of content nodes. It can be converted to a string, but also supports the following configuration methods:
set_tag_name($node_type, $tag_name): change the wrapper tag for nodes of a specific type.set_class($node_type, $classname): add/change the classname for nodes of a specific type.
| Node type | Default tag |
|---|---|
| title | h2 |
| subtitle | h3 |
| text | div |
| image | div |
| list | ul |
| quote | blockquote |
| Attribute | Type | Description |
|---|---|---|
| deferred | boolean | When present, the field will be stored in a separate table to improve performance for common use. Deferred fields will be fetched using a secondary query as soon as one is accessed. |
| name | string|required | Name of the field. |
| required | boolean | When present, the field will not be nullable. |
| unilingual | boolean | When present, support for internationalisation will be disabled. |
coordinates
The coordinates type provides longitude and latitude fields, specifically intended for geographical WGS84 coordinates. The coordinates are presented as a single object, containing lat and lon properties.
| Attribute | Type | Description |
|---|---|---|
| deferred | boolean | When present, the field will be stored in a separate table to improve performance for common use. Deferred fields will be fetched using a secondary query as soon as one is accessed. |
| index | boolean | When present, the database field will be indexed. |
| name | string|required | Name of the field. |
enum
The enum type provides an unsigned TINYINT field that can only contain predefined constant values.
| Attribute | Type | Description |
|---|---|---|
| default | string | The default value for the field. Truthy values are interpreted as true, falsy values as false. |
| deferred | boolean | When present, the field will be stored in a separate table to improve performance for common use. Deferred fields will be fetched using a secondary query as soon as one is accessed. |
| index | boolean | When present, the database field will be indexed. |
| multiple | boolean | When present, a separate table will be created and the field will accept multiple values. |
| name | string|required | Name of the field. |
| required | boolean | When present, the field will not be nullable. |
file
The file type provides multiple fields intended for file metadata.
image
The image type provides multiple fields intended for image metadata.
photomap
The photomap type provides a field containing a spatial representation of photo locations in a physical space.
polygonmap
The polygonmap type provides a field containing polygonal markup of one or more photos.
video
The video type provides multiple fields intended for video metadata. Currently support videos hosted on YouTube and Vimeo.