* Build form data. Can be modified via hook_civicrm_preProcess.
*/
public function preProcess() {
- $config = CRM_Core_Config::singleton();
-
$this->components['user-dashboard'] = [
'label' => ts("User Dashboard"),
'select' => NULL,
],
];
- if (in_array('CiviContribute', $config->enableComponents)) {
+ if (CRM_Core_Component::isEnabled('CiviContribute')) {
$this->components['contribution'] = [
'label' => ts("Contribution Page"),
'select' => [
];
}
- if (in_array('CiviEvent', $config->enableComponents)) {
+ if (CRM_Core_Component::isEnabled('CiviEvent')) {
$this->components['event'] = [
'label' => ts("Event Page"),
'select' => [
];
}
- if (in_array('CiviCampaign', $config->enableComponents)) {
+ if (CRM_Core_Component::isEnabled('CiviCampaign')) {
$this->components['petition'] = [
'label' => ts("Petition"),
'select' => [