- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/integration/socialnetwork/livefeed/crmactivity.php
- Класс: Bitrix\Crm\Integration\Socialnetwork\Livefeed\CrmActivity
- Вызов: CrmActivity::initSourceFields
public function initSourceFields()
{
$entityId = $this->getEntityId();
$fields = array();
if ($entityId > 0)
{
$fields = array(
'ID' => $entityId
);
if ($currentEntity = \CCrmActivity::getById($entityId, false))
{
$fields['CURRENT_ENTITY'] = $currentEntity;
switch($currentEntity['TYPE_ID'])
{
case \CCrmActivityType::Meeting:
$title = Loc::getMessage('CRMINTEGRATION_SONETLF_ENTITY_TITLE_ACTIVITY_MEETING', array(
'#SUBJECT#' => $currentEntity['SUBJECT'],
));
break;
case \CCrmActivityType::Call:
$title = Loc::getMessage('CRMINTEGRATION_SONETLF_ENTITY_TITLE_ACTIVITY_CALL', array(
'#SUBJECT#' => $currentEntity['SUBJECT'],
));
break;
case \CCrmActivityType::Email:
$title = Loc::getMessage('CRMINTEGRATION_SONETLF_ENTITY_TITLE_ACTIVITY_EMAIL', array(
'#SUBJECT#' => $currentEntity['SUBJECT'],
));
break;
default:
$title = Loc::getMessage('CRMINTEGRATION_SONETLF_ENTITY_TITLE_ACTIVITY_DEFAULT', array(
'#SUBJECT#' => $currentEntity['SUBJECT'],
));
}
$this->setSourceTitle($title);
}
}
$this->setSourceFields($fields);
}