I've looked at CRM/Event/Selector/Search.php to see it creating the View/Edit/Delete links, but am just unsure how to make this work. Can someone advise what the appropriate $objectName and $op should be? I'd like to do something like this:

function testmodule_civicrm_links( $op, $objectName, $objectId, &$links, &$mask, &$values ) {

  switch ($objectName) {
    case ???:  //Event or Contact perhaps?

      switch ($op) {
        case ???:  //a participant selector perhaps?

            $links[] = array(
                'name' => ts('Send Invoice'),
                'title' => ts('Send Invoice'),
                'url' => 'civicrm/activity/email/add',
                'qs' => 'action=add&reset=1&cid=%%cid%%&selectedChild=activity&atype=3&pid=%%id%%'

Where %%id%% comes in from the context of that row in the grid. If I can't get there with a hook, would it be prudent to extend CRM_Event_Selector_Search and override the links function with my own?

1 Answer 1


$op = 'participant.selector.row'; $objectName = 'Participant';

The hook is called from CRM_Core_Action::formLink

search for the above string in CRM/Event/Selector/Search.php, and the last couple of arguments gives the needed values which is then passed on to the hook

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.