Пример #1
0
 public function prepareDataForSave($entityTypeID, array &$fields)
 {
     $dstUserFields = LeadConversionMapper::getUserFields($entityTypeID);
     foreach ($dstUserFields as $dstName => $dstField) {
         if ($dstField['USER_TYPE_ID'] === 'file') {
             $this->prepareFileUserFieldForSave($dstName, $dstField, $fields);
         }
     }
 }
Пример #2
0
 protected static function prepareMap($entityTypeID)
 {
     if (isset(self::$maps[$entityTypeID])) {
         return self::$maps[$entityTypeID];
     }
     $map = EntityConversionMap::load(\CCrmOwnerType::Lead, $entityTypeID);
     if ($map === null) {
         $map = LeadConversionMapper::createMap($entityTypeID);
         $map->save();
     } elseif ($map->isOutOfDate()) {
         LeadConversionMapper::updateMap($map);
         $map->save();
     }
     return self::$maps[$entityTypeID] = $map;
 }