Skip to content
Snippets Groups Projects
Commit 723479e2 authored by DaveD's avatar DaveD
Browse files

only active

parent a057eec6
Branches
Tags
No related merge requests found
......@@ -2158,13 +2158,15 @@ class CRM_Core_BAO_CustomGroup extends CRM_Core_DAO_CustomGroup implements \Civi
$ogId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', 'cg_extend_objects', 'id', 'name');
$ogValues = CRM_Core_BAO_OptionValue::getOptionValuesArray($ogId);
foreach ($ogValues as $ogValue) {
$options[] = [
'id' => $ogValue['value'],
'label' => $ogValue['label'],
'grouping' => $ogValue['grouping'] ?? NULL,
'table_name' => $ogValue['name'],
'allow_is_multiple' => !empty($ogValue['filter']),
];
if ($ogValue['is_active']) {
$options[] = [
'id' => $ogValue['value'],
'label' => $ogValue['label'],
'grouping' => $ogValue['grouping'] ?? NULL,
'table_name' => $ogValue['name'],
'allow_is_multiple' => !empty($ogValue['filter']),
];
}
}
foreach ($options as &$option) {
$option['icon'] ??= CoreUtil::getInfoItem($option['id'], 'icon');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment