Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-947

Components can add actions to search selector via hook


    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: None
    • Fix Version/s: 1.5
    • Component/s: None
    • Labels:


      Quest staff need links to "View Application" and/or "Edit Application" in the Search selector.

      We will implement this as a new "search selector hook" which the Quest component invokes. Subsequently other components will be able to invoke this same hook if they need to add actions to the search selector action array.

      The hook should be called only once as the search selector is being initialized. It will add items to the core actions defined in the $links array (CRM/Contact/Selector.php) as specified by the hook invocation in Quest (and/or other) components. Row-level params are populated for each in the array structure via token (i.e. %%id%%) as we loop over the record set (as is done for core actions).

      As with core actions, these links are displayed conditionally based on whether the logged in user has "view Quest Application" and/or "edit Quest Application" permissions.

      NOTE: I think we'll need a way to correlate the action(s) defined by the hook invocation to particular permission(s). I'm not sure of the best way to do this ?? Perhaps the new CRM_Component_Action class includes a mask() function similar to CRM_Core_Action and the permissions are defined for each component action in the hook invocation, OR ??




            • Assignee:
              lobo Donald A. Lobo
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: