['far_contact_id', '=', 'RelationshipCache_Contact_far_contact_id_01.id'],
],
];
+$links = [
+ [
+ 'entity' => 'Relationship',
+ 'action' => 'view',
+ 'join' => '',
+ 'target' => 'crm-popup',
+ 'icon' => 'fa-external-link',
+ 'text' => ts('View Relationship'),
+ 'style' => 'default',
+ 'path' => '',
+ 'task' => '',
+ 'condition' => [],
+ ],
+ [
+ 'entity' => 'Relationship',
+ 'action' => 'update',
+ 'join' => '',
+ 'target' => 'crm-popup',
+ 'icon' => 'fa-pencil',
+ 'text' => ts('Update Relationship'),
+ 'style' => 'default',
+ 'path' => '',
+ 'task' => '',
+ 'condition' => [],
+ ],
+ [
+ 'task' => 'disable',
+ 'entity' => 'Relationship',
+ 'join' => '',
+ 'target' => 'crm-popup',
+ 'icon' => 'fa-toggle-off',
+ 'text' => ts('Disable Relationship'),
+ 'style' => 'default',
+ 'path' => '',
+ 'action' => '',
+ 'condition' => [
+ 'is_active',
+ '=',
+ TRUE,
+ ],
+ ],
+ [
+ 'entity' => 'Relationship',
+ 'action' => 'delete',
+ 'join' => '',
+ 'target' => 'crm-popup',
+ 'icon' => 'fa-trash',
+ 'text' => ts('Delete Relationship'),
+ 'style' => 'danger',
+ 'path' => '',
+ 'task' => '',
+ 'condition' => [],
+ ],
+];
if ($civiCaseEnabled) {
$joins[] = [
'Case AS RelationshipCache_Case_case_id_01',
'LEFT',
['case_id', '=', 'RelationshipCache_Case_case_id_01.id'],
];
+ $links[] = [
+ 'entity' => 'Case',
+ 'action' => 'view',
+ 'join' => 'RelationshipCache_Case_case_id_01',
+ 'target' => '',
+ 'icon' => 'fa-folder-open',
+ 'text' => ts('Manage Case'),
+ 'style' => 'default',
+ 'condition' => [],
+ ];
}
return [
'style' => 'default',
'size' => 'btn-xs',
'icon' => 'fa-bars',
- 'links' => [
- [
- 'entity' => 'Relationship',
- 'action' => 'view',
- 'join' => '',
- 'target' => 'crm-popup',
- 'icon' => 'fa-external-link',
- 'text' => ts('View Relationship'),
- 'style' => 'default',
- 'path' => '',
- 'task' => '',
- 'condition' => [],
- ],
- [
- 'entity' => 'Relationship',
- 'action' => 'update',
- 'join' => '',
- 'target' => 'crm-popup',
- 'icon' => 'fa-pencil',
- 'text' => ts('Update Relationship'),
- 'style' => 'default',
- 'path' => '',
- 'task' => '',
- 'condition' => [],
- ],
- [
- 'task' => 'disable',
- 'entity' => 'Relationship',
- 'join' => '',
- 'target' => 'crm-popup',
- 'icon' => 'fa-toggle-off',
- 'text' => ts('Disable Relationship'),
- 'style' => 'default',
- 'path' => '',
- 'action' => '',
- 'condition' => [
- 'is_active',
- '=',
- TRUE,
- ],
- ],
- [
- 'entity' => 'Relationship',
- 'action' => 'delete',
- 'join' => '',
- 'target' => 'crm-popup',
- 'icon' => 'fa-trash',
- 'text' => ts('Delete Relationship'),
- 'style' => 'danger',
- 'path' => '',
- 'task' => '',
- 'condition' => [],
- ],
- [
- 'entity' => 'Case',
- 'action' => 'view',
- 'join' => 'RelationshipCache_Case_case_id_01',
- 'target' => '',
- 'icon' => 'fa-folder-open',
- 'text' => ts('Manage Case'),
- 'style' => 'default',
- 'condition' => [],
- ],
- ],
+ 'links' => $links,
'type' => 'menu',
'alignment' => 'text-right',
],