Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

With properties you define the data that a KenedoModel holds. In the KenedoModel’s method getPropertyDefinitions() you return an array that defines which properties are in the model and provide settings for eachwith settings for each property that the model shall have.

See the Kenedo Model ‘Adminexamples’ in the model directory as example.

...

There are various types of properties like ‘string’, ‘translatable’, ‘image’ and others - here . Here you will see the property settings common to each type all types and then the types with their specific settings.

...

Required: yes
Valid values: string

The name setting defines the column name in the DB table behind the model and that name will also be used as object variable name in the getRecord()/ and getRecords() return object.

type

Required: yes
Valid values: string - Names of KenedoProperty Types (image, id, join, date etc)

Defines of which type the property is. See below about each property type.

Each property has a PHP Class class extending KenedoProperty (e.g. property type ‘translatable’ is backed by the class KenedoPropertyTranslatable. The classes are in the directory {AppDir}/external/kenedo/properties/ and in {customizationDir}/properties/ you can store your own types.

label

Required: yes
Valid values: string

...

Required: no
Valid values: numbers or omit
In CB 3.3.2 (Magento 2 CB 3.3.10) and lower) - , this setting is called named ‘listing’

With this setting you control if the property should be displayed in the backend list view and in which order.

...

Required: no
Valid values: boolean or omit
In CB 3.3.2 (Magento 2 CB 3.3.10) and lower) - , this setting is called named ‘order’

This setting regards the backend list view sorting - use ‘true’ to allow admins to sort the table by this property’s values.

...

Required: no
Valid values: boolean or omit
In CB 3.3.2 (Magento 2 CB 3.3.10) and lower) - , this setting is called named ‘search’

Use ‘true’ to show a search box in backend list views. Possible with certain property types (e.g. translatable and string).

...

Required: no
Valid values: boolean or omit
In CB 3.3.2 (Magento 2 CB 3.3.10) and lower) - , this setting is called named ‘filter’

Use ‘true’ to show a dropdown for filtering by possible values. Works with certain property types (e.g. join, boolean, published).

...

Required: no
Valid values: boolean or omit
In CB 3.3.2 (Magento 2 CB 3.3.10) and lower) - , this setting is called named ‘listinglink’

With this setting you choose which property will show as edit link in backend list views.

...