function redhen_engagement_get_scores in RedHen CRM 7
Gets an array of all engagement scores, keyed by the name.
Parameters
string $name: If set, the type with the given name is returned.
4 calls to redhen_engagement_get_scores()
- redhen_engagements_page in modules/
redhen_engagement/ redhen_engagement.module - Page callback for showing a contacts engagements.
- redhen_engagement_form_redhen_note_form_alter in modules/
redhen_engagement/ redhen_engagement.module - Implements hook_form_FORMP_ID_alter().
- redhen_engagement_score_options in modules/
redhen_engagement/ redhen_engagement.module - Helper function for getting engagement score options.
- redhen_engagement_update_7100 in modules/
redhen_engagement/ redhen_engagement.install - Change engagement_score_id from int to varchar/change column name.
1 string reference to 'redhen_engagement_get_scores'
- redhen_engagement_score_form in modules/
redhen_engagement/ includes/ redhen_engagement.admin.inc - Generates the Redhen Contact type editing form.
File
- modules/
redhen_engagement/ redhen_engagement.module, line 251 - RedhenEngagement hook implementations and API
Code
function redhen_engagement_get_scores($name = NULL) {
$types = entity_load_multiple_by_name('redhen_engagement_score', isset($name) ? array(
$name,
) : FALSE);
return isset($name) ? reset($types) : $types;
}