Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions backend-controllers-ajax.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ Usually each controller implements functionality for working with a single type

The backend controller base class defines a number of properties that allow to configure the page appearance and manage the page security:

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Property | Description
------------- | -------------
`$fatalError` | allows to store a fatal exception generated in an action method in order to display it in the view.
Expand Down
126 changes: 126 additions & 0 deletions backend-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ preview:

The following fields are required in the form configuration file:

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Field | Description
------------- | -------------
`name` | the name of the object being managed by this form.
Expand All @@ -82,6 +88,12 @@ Field | Description

The configuration options listed below are optional. Define them if you want the form behavior to support the [Create](#form-create-page), [Update](#form-update-page) or [Preview](#form-preview-page) pages.

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`defaultRedirect` | used as a fallback redirection page when no specific redirect page is defined.
Expand All @@ -104,6 +116,12 @@ create:

The following configuration options are supported for the Create page:

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`title` | a page title, can refer to a [localization string](../plugin/localization).
Expand All @@ -127,6 +145,12 @@ update:

The following configuration options are supported for the Update page:

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`title` | a page title, can refer to a [localization string](../plugin/localization).
Expand Down Expand Up @@ -218,6 +242,12 @@ Fields from related models can be rendered with the [Relation Widget](#widget-re

For each tab definition, namely `tabs` and `secondaryTabs`, you can specify these options:

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`stretch` | specifies if this tab stretches to fit the parent height.
Expand Down Expand Up @@ -260,6 +290,12 @@ tabs:

For each field you can specify these options (where applicable):

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`label` | a name when displaying the form field to the user.
Expand Down Expand Up @@ -739,6 +775,12 @@ css_content:
language: html
```

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`language` | code language, for example, php, css, javascript, html. Default: `php`.
Expand All @@ -756,6 +798,12 @@ color:
type: colorpicker
```

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`availableColors` | list of available colors. If not provided, the widget will use the global available colors.
Expand Down Expand Up @@ -822,6 +870,12 @@ data:

The following lists the configuration values of the data table widget itself.

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------ | -----------
`adding` | allow records to be added to the data table. Default: `true`.
Expand Down Expand Up @@ -858,6 +912,12 @@ columns:
title: Name
```

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------ | -----------
`type` | the input type for this column's cells. Must be one of the following: `string`, `checkbox`, `dropdown` or `autocomplete`.
Expand All @@ -871,6 +931,12 @@ Option | Description

Column cells can be validated against the below types of validation. Validation should be specified as an array, with the type of validation used as a key, and an optional message specified as the `message` attrbute for that validation.

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Validation | Description
---------- | -----------
`float` | Validates the data as a float. An optional boolean `allowNegative` attribute can be provided, allowing for negative float numbers.
Expand All @@ -891,6 +957,12 @@ published_at:
mode: date
```

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`mode` | the expected result, either date, datetime or time. Default: `datetime`.
Expand Down Expand Up @@ -924,6 +996,12 @@ avatar:
extension: auto
```

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`mode` | the expected file type, either file or image. Default: image.
Expand Down Expand Up @@ -967,6 +1045,12 @@ background_image:
mode: image
```

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`mode` | the expected file type, either file or image. Default: file.
Expand Down Expand Up @@ -1047,6 +1131,12 @@ user:
modelClass: Winter\User\Models\User
```

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`keyFrom` | the name of column to use in the relation used for key. Default: `id`.
Expand Down Expand Up @@ -1086,6 +1176,12 @@ user:

You can also provide a model scope to use to filter the results with the `scope` property.

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`nameFrom` | a model attribute name used for displaying the relation label. Default: `name`.
Expand Down Expand Up @@ -1116,6 +1212,12 @@ extra_information:
type: text
```

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`form` | a reference to form field definition file, see [backend form fields](#form-fields). Inline fields can also be used.
Expand Down Expand Up @@ -1224,6 +1326,12 @@ api_secret:
hideOnTabChange: true
```

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`allowCopy` | adds a "copy" action to the sensitive field, allowing the user to copy the password without revealing it. Default: `false`
Expand Down Expand Up @@ -1260,6 +1368,12 @@ tags:
mode: relation
```

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`mode` | controls how the value is returned, either string, array or relation. Default: `string`
Expand Down Expand Up @@ -1391,6 +1505,12 @@ slug:

The following options are available for the `preset` option:

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`field` | defines the other field name to source the value from.
Expand Down Expand Up @@ -1430,6 +1550,12 @@ send_at:

In the above example the `send_at` form field will only be shown if the `is_delayed` field is checked. In other words, the field will show (action) if the other form input (field) is checked (condition). The `trigger` definition specifies these options:

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`action` | defines the action applied to this field when the condition is met. Supported values: show, hide, enable, disable, empty.
Expand Down
24 changes: 24 additions & 0 deletions backend-import-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ export:

The configuration options listed below are optional. Define them if you want the behavior to support the [Import](#import-page) or [Export](#export-page), or both.

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`defaultRedirect` | used as a fallback redirection page when no specific redirect page is defined.
Expand Down Expand Up @@ -101,6 +107,12 @@ export:

The following configuration options are supported for the Export page:

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`title` | a page title, can refer to a [localization string](../plugin/localization).
Expand Down Expand Up @@ -226,6 +238,12 @@ class SubscriberImport extends \Backend\Models\ImportModel

The class must define a method called `importData` used for processing the imported data. The first parameter `$results` will contain an array containing the data to import. The second parameter `$sessionKey` will contain the session key used for the request.

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Method | Description
------------- | -------------
`logUpdated()` | Called when a record is updated.
Expand Down Expand Up @@ -329,6 +347,12 @@ export:

The following configuration options are supported:

<style>
.attributes-table-precessor + table td:first-child,
.attributes-table-precessor + table td:first-child > * { white-space: nowrap; }
</style>
<div class="attributes-table-precessor"></div>

Option | Description
------------- | -------------
`definition` | the list definition to source records from, optional.
Expand Down
Loading