Layouts
Introduction
Layouts
describe user defined display information for many different entities. Especially used on Form
components Layouts
are the main component for relating display information to different types.
Layouts
usually consist of at least one LayoutRow and LayoutColumn. Elements are attached to LayoutColumns utilizing LayoutColumnLayoutElements.
Model Definition
Alias
layout
Relations
layoutable
Morph to
layoutable_type
, layoutable_id
layoutRows
Has many
layoutRows.layout_id
Layoutable types
form
(Form)taskTemplate
(TaskTemplate)
Layoutable types are keys for different entities existing in our system. Every layoutable type listed here has itself a relationship to Layouts
which can be accessed with the key layout
.
Affected entities are marked with the trait Layoutable
.
Types
Currently only the default
type is supported.
Traits
Sortable
SoftDeletes
List
Get a list of all Layouts
available in the system.
Definition
GET
/api/layouts
Example Request
Example Response
Show
Show a single Layout
by id
.
Definition
GET
/api/layouts/{id}
Example Request
Example Response
Create
Creates a new Layout
Definition
POST
/api/layouts/
Request Keys
title
string
null
The title for the layout.
layoutable_type
*
string
-
Layoutable type (see above).
layoutable_id
*
string
-
Layoutable ID (see above).
type
*
required
'default'
The type of the layout (see above).
sort_number
required
Current highest +1
The index of the Layout
related to the Layoutable
.
Keys with *
are required.
Advanced Key-Specifications
type
- The given type must be unique for the targetedLayoutable
Example Request
Example Response
Update
Update an existing Layout
by id
.
Definition
PUT
/api/layouts/{id}
Request Keys
title
string
-
The title for the layout.
layoutable_type
string
-
Layoutable type (see above).
layoutable_id
string
-
Layoutable ID (see above).
type
required
-
The type of the layout (see above).
sort_number
required
Current highest +1
The index of the Layout
related to the Layoutable
.
Advanced Key-Specifications
type
- A given type must be unique for the targetedLayoutable
Example Request
Example Response
Delete
Delete an existing Layout
by id
.
Definition
DELETE
/api/layouts/{id}
Example Request
Example Response
Last updated