Skip to content
Snippets Groups Projects

Add option to hide 'View Contact' link on 'Contact Search' output

Merged mattwire requested to merge mattwire/dataprocessor:hideviewcontact into master
@@ -34,4 +34,18 @@ class CRM_Dataprocessor_Upgrader extends CRM_Dataprocessor_Upgrader_Base {
return TRUE;
}
public function upgrade_1002() {
$this->ctx->log->info('Applying 1002 update; Add link_to_view_contact parameter to contact_search outputs.');
$dataProcessorOutputs = civicrm_api3('DataProcessorOutput', 'get', [
'options' => ['limit' => 0],
])['values'];
foreach ($dataProcessorOutputs as $outputID => $output) {
if (($output['type'] === 'contact_search') && (!isset($output['configuration']['link_to_view_contact']))) {
$output['configuration']['link_to_view_contact'] = TRUE;
civicrm_api3('DataProcessorOutput', 'create', $output);
}
}
return TRUE;
}
}
Loading