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%%'
);
break;
}
}
}
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?