Skip to content

Commit

Permalink
Add function to get 'view only' activity types
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwire committed Nov 1, 2019
1 parent 5dced02 commit 620d09f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CRM/Activity/BAO/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -2482,6 +2482,21 @@ public static function checkEditInboundEmailsPermissions() {
return FALSE;
}

/**
* Get the list of view only activities
*
* @return array
*/
public static function getViewOnlyActivityTypeIDs() {
$viewOnlyActivities = [
'Email' => CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_type_id', 'Email'),
];
if (self::checkEditInboundEmailsPermissions()) {
$viewOnlyActivities['Inbound Email'] = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_type_id', 'Inbound Email');
}
return $viewOnlyActivities;
}

/**
* Wrapper for ajax activity selector.
*
Expand Down
7 changes: 7 additions & 0 deletions CRM/Case/Selector/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ class CRM_Case_Selector_Search extends CRM_Core_Selector_Base {
*/
public static $_links = NULL;

/**
* The action links that we need to display for the browse screen.
*
* @var array
*/
private static $_actionLinks;

/**
* We use desc to remind us what that column is, name is used in the tpl
*
Expand Down

0 comments on commit 620d09f

Please sign in to comment.