APIv4 - Add Address::getCoordinates action
[civicrm-core.git] / CRM / Core / Form / ShortCode.php
index 58ce68a55b2eaffb893d44371242d57ba53cf400..ca526ee06eba67c4db0f1ac1ef5735776421a625 100644 (file)
@@ -53,8 +53,6 @@ class CRM_Core_Form_ShortCode extends CRM_Core_Form {
    * 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,
@@ -73,7 +71,7 @@ class CRM_Core_Form_ShortCode extends CRM_Core_Form {
       ],
     ];
 
-    if (in_array('CiviContribute', $config->enableComponents)) {
+    if (CRM_Core_Component::isEnabled('CiviContribute')) {
       $this->components['contribution'] = [
         'label' => ts("Contribution Page"),
         'select' => [
@@ -92,7 +90,7 @@ class CRM_Core_Form_ShortCode extends CRM_Core_Form {
       ];
     }
 
-    if (in_array('CiviEvent', $config->enableComponents)) {
+    if (CRM_Core_Component::isEnabled('CiviEvent')) {
       $this->components['event'] = [
         'label' => ts("Event Page"),
         'select' => [
@@ -103,7 +101,7 @@ class CRM_Core_Form_ShortCode extends CRM_Core_Form {
       ];
     }
 
-    if (in_array('CiviCampaign', $config->enableComponents)) {
+    if (CRM_Core_Component::isEnabled('CiviCampaign')) {
       $this->components['petition'] = [
         'label' => ts("Petition"),
         'select' => [