Skip to main content
Version: 2023.3

Object Data Types

The entire list of data types is indicated below:

Text Datatypes

NameDescription
inputtext input field
textareatextarea
wysiwygtext area with formatting options through a WYSIWYG editor
passwordpassword field

Number Datatypes

NameDescription
numericspinner field for number input
slidernumber input with slider widget (min - max slider)
quantity valuenumber input with an additional unit. available units can be configured centrally.

Date Datatypes

NameDescription
datecalendar date selector
date & timecalendar date selector + combo box for time
timecombo box for time

Select Datatypes

NameDescription
selectcombo box
usercombo box to select from all existing Pimcore users (available since build 716)

In the user settings the object dependencies of each user are shown in the second tab panel.
All objects which reference the selected user are listed in a grid view.

If one needs to find out which objects hold a reference to a specific user, the Pimcore\\Tool\\Admin::getObjectsReferencingUser($userId) method can be used to find all referencing objects.
countrycombo box with predefined country list
languagecombo box with predefined language list
multiselectcombo box with multiple select
countriescombo box with multiple select and predefined country list
languagescombo box with multiple select and combo box with multiple select and predefined language

Select Options

NameDescription
select optionsManage select options for (multi)select fields

Dynamic Select Datatypes

NameDescription
dynamic selectcombo box

Relational Datatypes

NameDescription
Many-To-One Relationreference to a Pimcore document, object or asset
Many-To-Many Relationcollection of references to Pimcore documents, objects, assets
Advanced Many-To-Many Relationcollection of references to Pimcore documents, objects, assets with additional metadata on the relation
Many-To-Many Object Relationcollection of Pimcore object references
Advanced Many-To-One Object Relationcollection of Pimcore object references with additional metadata on the relation
Reverse Object Relationcollection of Pimcore object references which are owned by a different object

Structured Datatypes

NameDescription
blockrepeatable block of attributes within an object
classificationstoreadvanced store for classification systems like ETIM, ecl@ss, etc.
tabletable input
structuredtabletable with predefined rows and columns
fieldcollectionsA collection of fields that can be added to the object
objectbricksBricks of attributes, that can be added to objects
localizedfieldsSet of attributes that can be translated

Geographic Datatypes

NameDescription
geopointmaps widget to find longitude/latitude
geoboundsmaps widget to define geographical bounds
geopolygonmaps widget to define a geographical area
geopolylinemaps widget to define a geographical path

Other Datatypes

NameDescription
imagedrop area & preview for a Pimcore image asset
externalimagerelation to an image that is not stored in Pimcore
imageadvanceddrop area & preview for a Pimcore image asset with additional features for markers, hotspots, cropping
imagegallerycollection of Image Advanced images
videodrop area & preview for a Pimcore video asset
checkboxcheckbox
linklink selector with link target
calculatedvaluedatatype for calculated values - calculation can be defined with a PHP class

CRM Datatypes

NameDescription
firstnametyped input field for firstname
lastnametyped input field for lastname
emailtyped input field for email including validation
gendertyped and prefilled select for gender
personatyped selectbox for personas defined within Pimcore
personastyped selectbox with multiselect for personas defined within Pimcore
consentstore consent of user for something, e.g. consent for direct marketing mailing

The following datatypes are only available if the PimcoreNewsletterBundle is enabled and installed:

NameDescription
newsletteractivetyped checkbox if newsletter is active
newsletterconfirmedtyped checkbox if newsletter is confirmed

General Aspects

All data types are wrapped in an object derived from Pimcore\Model\DataObject\ClassDefinition\Data. These data type objects provide getters and setters and they define the Description in the frontend. Data type objects are displayed in the first column of the table above. The second column indicates the underlying data type class and the third column outlines the Description used in Pimcore to fill in, edit and display data objects.

Besides the name, which is the name of the object's property and the title, which is shown in the GUI, an object field has the general configuration options listed below. The title can be translated for different system languages. Please see the article about Translations to find out how to add object field translations.

  • mandatory: Makes the field mandatory and does not allow saving the object when it is empty
  • not editable: Does not allow a change of this field's value in Pimcore backend (data change can only be done programmatically)
  • invisible: The field is not visible in Pimcore
  • visible in grid view: Determines if the field's data column is shown in the object grid view, or hidden (meaning it has to be activated manually)
  • visible in search result: Determines if the field's data column is shown in the search results grid, or hidden (meaning it has to be activated manually)
  • indexed: puts an index on this column in the database
  • unique: If checked, the value has to be unique across all objects of this class. Note that only works on top level attributes and not on nested stuff inside localized fields etc. Beware that this does not add a database index to the query table which Listing classes use.
  • Moreover, each data field can have a tooltip, which is shown when the mouse hovers over the input field.

Data Field SettingsData Field SettingsData Field Settings Data Field SettingsData Field SettingsData Field Settings

The layout settings allow to apply custom CSS to any object field.

Data Field SettingsData Field SettingsData Field Settings

WARNING
Please note that renaming a field means the loss of data from the field in all objects using this class.

See sub-pages of this page for detail documentation of different data types.

Default values

For datatypes which support default values (currently these are Input, Date, Datetime, Numeric, Checkbox, Select and Quantity Value) you can either specify a fixed default value or you can specify a default value generator service or class which can generate a dynamic default value.

The data is persisted according to the following rules.

  1. No inheritance: default value is persisted to store/query table on create
  2. With inheritance and NO parent value: default value is persisted to store/query table on create
  3. With inheritance and existing parent value: no value is persisted to store table, inherited value is persisted to query table, inheritance is active

A default value generator is a class which implements \Pimcore\Model\DataObject\ClassDefinition\DefaultValueGeneratorInterface. This class can generate a value based on the current data of an object. Have a look at Calculated Value for an overview of contextual information.

If a default value generator is defined then it has a higher priority than a configured static default value.

The decisions are made in the following order:

  1. default value generator. if defined the process stops here

  2. parent value if inheritance is enabled

  3. fixed default value