Object Classes

Skip to end of metadata
Go to start of metadata

To get started with data objects, classes must be defined. Defining a class consists of defining the attributes of the object and the layout for data within the object. Layoutwise object properties can be grouped into panels, which incorporate the the layout areas north, east, west, south and center and additionally they can be positioned into tab panels. This allows logical structuring of object attributes into smaller units of data belonging together. It depends on the use case how data should be grouped and structured. Common applications are tabs/groups for different languages or logical groups like basic data, media, sales data, etc.

To define a class, the menu Settings/Objects/Classes needs to be used the pimcore toolbar menu. The class name has to be a valid php class name. After creating a new class, the class attributes and layout can be built.

Class attributes are defined from a set of predefined data types. These data types define not only the type of data such as text, number, image, refefence to an other object etc. but also how data input can be achieved and how data is accessed. Each data type comes with an input widget. For instance, the image data input comes with a drop area to which a user can drag and drop an image. The entire list of data types is indicated below

Name Underlying data type Input widget
checkbox Object_Class_Data_Checkbox checkbox
country Object_Class_Data_Country combo box with predefined country list from Zend_Locale
date Object_Class_Data_Date calendar date selector
date & time Object_Class_Data_Datetime calendar date selector + combo box for time
fieldcollections Object_Class_Data_Fieldcollections A collection of fields
geopoint Object_Class_Data_Geopoint google maps widget to find longitude/latitude
geobounds Object_Class_Data_Geobounds google maps widget to define geographical bounds
geopolygon Object_Class_Data_Geopolygon google maps widget to define a geographical area
href Object_Class_Data_Href reference to a pimcore document, object or asset
image Object_Class_Data_Image drop area & preview for a pimcore asset
input Object_Class_Data_Input text input field
language Object_Class_Data_Language combo box with predefined language list from Zend_Locale
link Object_Class_Data_Link link selector with link target
multihref Object_Class_Data_Multihref collection of references to pimcore documents,objects,assets
multiselect Object_Class_Data_Multiselect combo box with multiple select
nonownerobjects Object_Class_Data_Nonownerobjects object relations which are owned by a different object
numeric Object_Class_Data_Numeric spinner field for number input
objects Object_Class_Data_Objects collection of pimcore object references
password Object_Class_Data_Password password field
select Object_Class_Data_Select combo box
slider Object_Class_Data_Slider number input with slider widget (min - max slider)
table Object_Class_Data_Table table input
textarea Object_Class_Data_Textarea textarea
wysiwyg Object_Class_Data_Wysiwyg textarea with formating options through a WYSIWYG edtior
user Object_Class_Data_User combo 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.

All data types are wrapped in an object derived from Object_Class_Data. These data type objects provide getters and setters and they define the input widget 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 input widget used in pimcore to fill in, edit and display data objects.

Object class names, fields and layout compontents can be translated to different languages in the pimcore admin (since pimcore 1.3.0) . Please see Translations for more information how these components are translated.

Labels

objects objects Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.