• Модуль: report
  • Путь к файлу: ~/bitrix/modules/report/lib/visualconstructor/entity/widget.php
  • Класс: BitrixReportVisualConstructorEntityWidget
  • Вызов: Widget::getMapReferenceAttributes
static function getMapReferenceAttributes()
{
	return array(
		'row' => array(
			'type' => Common::MANY_TO_ONE,
			'targetEntity' => DashboardRow::getClassName(),
			'inversedBy' => 'widgets',
			'join' => array(
				'field' => array('rowId', 'id')
			)
		),
		'configurations' => array(
			'type' => Common::MANY_TO_MANY,
			'targetEntity' => Configuration::getClassName(),
			'join' => array(
				'tableClassName' => WidgetConfigurationTable::getClassName(),
				'column' => array('WIDGET' => array('id', 'WIDGET_ID')),
				'inverseColumn' => array('CONFIGURATION_SETTING' => array('id', 'CONFIGURATION_ID'))
			),
		),
		'reports' => array(
			'type' => Common::ONE_TO_MANY,
			'targetEntity' => Report::getClassName(),
			'mappedBy' => 'widget'
		),
		'parentWidget' => array(
			'type' => Common::MANY_TO_ONE,
			'targetEntity' => Widget::getClassName(),
			'inversedBy' => 'childWidgets',
			'join' => array(
				'field' => array('parentWidgetId', 'id')
			),
			'options' => array(
				'deleteSkip' => true
			)
		),
		'childWidgets' => array(
			'type' => Common::ONE_TO_MANY,
			'targetEntity' => Widget::getClassName(),
			'mappedBy' => 'parentWidget',
			'options' => array(
				'deleteSkip' => true
			)
		),
	);
}