Serious question - the most popular answer will most likely make it onto one. Think hard, people, and feel free to make other thoughts and suggestions too...
7 Answers
Trying to think of a clever play on the api syntax. Maybe
civicrm_api('Community', 'Create')
or else
civicrm_api('Scout', 'Fetch')
or maybe
civicrm_api('Warm_Beer', 'Get')
try {
return self::_invoke($args);
}
catch (Exception $e) {
CRM_Core_Error::handleUnhandledException($e);
}
try{
$result = civicrm_api3('Contact', 'get', $params);
}
or maybe
civix generate:sandwich
I would love to add some hooks reference like below -
function my_custom_civicrm_buildForm($formName, &$form) {
// since the $form object was passed by reference, modifying it here will change it permanently
$form->assign('intro_text', ts('hello world'));
}
Probably wayyyyyy too late, but seems like something along these lines should be in the running:
civicrm/CRM/Contact/BAO/Query.php: // IF(civicrm_contribution.contribution_status_id = 1, total_amount, 0 ) as total_completed,
// Fixme: dear god why? these come out in a format that is NOT the name of the fields.
foreach ($nameFields as &$fix) {
$fix = str_replace(' ', '_', strtolower($fix));
if ($fix == 'prefix' || $fix == 'suffix') {
// God, why god?
$fix .= '_id';
}
}
Personally, CHILLING OUT AT THE CIVICRM_EMAIL TABLE might be the winner, or logic may have eroded.
-
For more, gist.github.com/xurizaemon/571c495dbd7feaa129f0202e247d6634 Feb 10 at 9:50