The problem is that:
* `hook_links('pcp.user.actions')` fires with a malformed set links
* The malformed set of links has been specifically encoded into unit tests
So fixing the bad links would likely break some consumer. (I don't see the
consumer in my copy of `universe`, but if someone wrote the test, then they
must've really meant it...)
This patch adds alternative variants (`hook_links('pcp.user.actions.add')` and
`hook_links('pcp.user.actions.all')`) which should replace it.
],
];
+ // pcp.user.actions emits a malformed set of $links. But it is locked-in via unit-test, so we'll grandfather
+ // the bad one and fire new variants that are well-formed.
CRM_Utils_Hook::links('pcp.user.actions', 'Pcp', $pcpId, self::$_pcpLinks);
+ CRM_Utils_Hook::links('pcp.user.actions.add', 'Pcp', $pcpId, self::$_pcpLinks['add']);
+ CRM_Utils_Hook::links('pcp.user.actions.all', 'Pcp', $pcpId, self::$_pcpLinks['all']);
}
return self::$_pcpLinks;
}