Each iblock is an independent data type with its own set of properties. It's represented by a separate entity in the ORM:
Entity class name includes a new field value taken from API symbolic code iblock config. This code ensures the class unique status independently from ID and environment.
Important! You need to set API symbolic code (API_CODE field) for specific block to start using ORM. It's a string with a symbol from 1 to 50, starting from a letter and consisting of Latin characters and numerals.
Property contains not just scalar values, but also relations with individual mini-entities having two key fields: VALUE and DESCRIPTION. Singular properties are presented in the iblock element by the field Reference, multiple properties - OneToMany:
You can add extra fields to entities of some property types. For example, link to a bound iblock element:
More details on basic property types
For standard case, the property entity consist of two fields - VALUE (type depends on property) and, if defined in property settings, DESCRIPTION (StringField).
You can find direction among a large number of properties using
annotations mechanism
Majority of Object and Collection methods - are virtual, processed via magic__call. At the same time, they are designed for the intuitively clear and self-explanatory named methods and without autocomplete in IDE their value significantly decreases.
For the IDE to know about their existence and to help find direction in the large number of classes and methods, Bitrix24 have provided a special service file with annotations for all entities.
Learn more ...
. All iblocks will be described as ORM entities when indexing the iblock module. You need to clearly designate iblock class to get hints in the code:
where Link in the class name - iblock API symbolic code.
Attention! Property's symbolic code shall not match with element field name in an iblock. Otherwise, you won't be able to work with property by name (symbolic code) in ORM.