Documentation

TypeDataManager

Description and methods

Abstract class for data manager for types. This data manager table has a specific set of system fields. Descendants can add their own fields.

Inheritance chain

Bitrix\Main\UserField\Internal\TypeDataManager is descendant for class Bitrix\Main\ORM\Data\DataManager.

Default fields


  • ID
  • NAME Item string ID. Required
  • TABLE_NAME String with table name that stores items. Required

Methods

Method Description Available from version
public static function getFactory(): TypeFactory Returns a factory instance
public static function resolveType($type): ?array Attempts to get information by the fastest way of getting information on type. $type can be type identifier, a complete array or ORM object
public static function compileEntity($type): Entity Compiles entity for items data manager for type $type.

Creating columns and tables

Event handler methods create and delete columns and tables.

Method Description Available from version
public static function onAfterAdd(Event $event): EventResult Creates table for type items.
public static function onAfterUpdate(Event $event): EventResult Renames previously created tables, when field TABLE_NAME was updated.
public static function onBeforeDelete(Event $event): EventResult Here:

  • deletes files from "файл" property type;
  • deletes list values from "list" property type;
  • deletes language files for all user fields of this type;
  • deletes all user field record of this type;
  • deletes all tables of multiple values of this type.
public static function onAfterDelete(Event $event): EventResult Deletes table of items.


© «Bitrix24», 2001-2024
Up