• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/test/typography/booktable.php
  • Класс: BitrixMainTestTypographyBookTable
  • Вызов: BookTable::getMap
static function getMap()
{
	return [
		(new IntegerField('ID'))
			->configurePrimary()
			->configureAutocomplete(),

		(new StringField('TITLE')),

		(new IntegerField('PUBLISHER_ID')),

		(new Reference(
				'PUBLISHER',
				PublisherTable::class,
				Join::on('this.PUBLISHER_ID', 'ref.ID')
			))
			->configureJoinType('inner'),

		(new StringField('ISBN'))
			->configureUnique(),

		(new BooleanField('IS_ARCHIVED'))
			->configureValues('N', 'Y'),

		(new ArrayField('QUOTES')),

		(new ManyToMany('AUTHORS', AuthorTable::class))
			->configureMediatorTableName('(
				(SELECT 1 AS BOOK_ID, 18 AS AUTHOR_ID)
				UNION
				(SELECT 2 AS BOOK_ID, 17 AS AUTHOR_ID)
				UNION
				(SELECT 2 AS BOOK_ID, 18 AS AUTHOR_ID)
			)'),

		(new OneToMany('STORE_ITEMS', StoreBookTable::class, 'BOOK'))
	];
}