}
}
}
-
+ $baoString = 'CRM_Core_BAO_' . $name;
foreach ($params[$blockName] as $count => $value) {
if (!is_array($value)) {
continue;
// $updateBlankLocInfo will help take appropriate decision. CRM-5969
if (!empty($value['id']) && !$dataExists && $updateBlankLocInfo) {
//delete the existing record
- self::blockDelete($blockName, ['id' => $value['id']]);
+ $baoString::del($value['id']);
continue;
}
elseif (!$dataExists) {
}
$blockFields = array_merge($value, $contactFields);
- $baoString = 'CRM_Core_BAO_' . $name;
$blocks[] = $baoString::create($blockFields);
}
/**
* Delete block.
+ * @deprecated - just call the BAO / api directly.
*
* @param string $blockName
* Block name.