• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/internals/eventservice/service.php
  • Класс: BitrixSocialnetworkInternalsEventServiceService
  • Вызов: Service::getEventInstance
private function getEventInstance($type): Event
{
	switch ($type)
	{
		case EventDictionary::EVENT_WORKGROUP_ADD:
		case EventDictionary::EVENT_WORKGROUP_BEFORE_UPDATE:
		case EventDictionary::EVENT_WORKGROUP_UPDATE:
		case EventDictionary::EVENT_WORKGROUP_DELETE:
			$event = new EventServiceEventWorkgroupEvent($type);
			break;
		case EventDictionary::EVENT_WORKGROUP_USER_ADD:
		case EventDictionary::EVENT_WORKGROUP_USER_UPDATE:
		case EventDictionary::EVENT_WORKGROUP_USER_DELETE:
			$event = new EventServiceEventWorkgroupUserEvent($type);
			break;
		default:
			$event = new EventServiceEvent($type);
	}

	return $event;
}