Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing types to component properties #222

Merged
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
4 changes: 3 additions & 1 deletion plugin/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Key | Description
`title` | required, the property title, it is used by the component Inspector in the CMS backend.
`description` | required, the property description, it is used by the component Inspector in the CMS backend.
`default` | optional, the default property value to use when the component is added to a page or layout in the CMS backend.
`type` | optional, specifies the property type. The type defines the way how the property is displayed in the Inspector. Currently supported types are `string`, `checkbox`, `dropdown` and `set`. Default value: `string`.
`type` | optional, specifies the property type. The type defines the way how the property is displayed in the Inspector. Currently supported types are `string`, `text`, `stringList`, `autocomplete`, `checkbox`, `dropdown`, `dictionary`, `object`, `objectList` and `set`. Default value: `string`.
`validationPattern` | optional Regular Expression to use when a user enters the property value in the Inspector. The validation can be used only with `string` properties.
`validationMessage` | optional error message to display if the validation fails.
`required` | optional, forces field to be filled. Uses validationMessage when left empty.
Expand All @@ -115,6 +115,8 @@ Key | Description
`group` | an optional group name. Groups create sections in the Inspector simplifying the user experience. Use a same group name in multiple properties to combine them.
`showExternalParam` | specifies visibility of the External Parameter editor for the property in the Inspector. Default value: `true`.

> **NOTE:** You can find a more detailed description of the different types on the “[data inspector types](../ui/controls/inspector##data-schema-configuration)” page.

Inside the component you can read the property value with the `property` method:

```php
Expand Down
Loading