- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/import/vcardimport.php
- Класс: Bitrix\Crm\Import\VCardImport
- Вызов: VCardImport::mapContact
public function mapContact(VCard\VCardElement $element)
{
$this->fields = array();
$this->mappedFields = array();
$this->mappedMultiFields = array();
$this->tryMapNameAttribute($element, $this->fields);
$this->tryMapBirthdayAttribute($element, $this->fields);
$this->tryMapAddressAttribute($element, array('pref', 'work', 'home', ''), $this->fields);
$this->tryMapTelAttribute($element, $this->fields);
$this->tryMapEmailAttribute($element, $this->fields);
$this->tryMapUrlAttribute($element, $this->fields);
$this->tryMapFileAttribute($element, 'PHOTO', 'PHOTO', $this->fields);
$this->tryMapFileAttribute($element, 'LOGO', 'COMPANY_LOGO', $this->fields);
$this->tryMapAttribute($element, 'ORG', 'COMPANY_TITLE', $this->fields);
$this->tryMapAttribute($element, 'TITLE', 'POST', $this->fields);
$this->tryMapAttribute($element, 'NOTE', 'COMMENTS', $this->fields);
return !empty($this->fields);
}