APIv4 - Add Address::getCoordinates action
[civicrm-core.git] / CRM / Core / Form / ShortCode.php
index a0817b572718316097011cc25703bffe6b276e81..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' => [
@@ -160,6 +158,7 @@ class CRM_Core_Form_ShortCode extends CRM_Core_Form {
           'edit' => ts('Edit'),
           'view' => ts('View'),
           'search' => ts('Search/Public Directory'),
+          'map' => ts('Map View'),
         ],
       ],
       [