Fix export
authorMatthew Wire <devel@mrwire.co.uk>
Mon, 7 May 2018 06:42:45 +0000 (07:42 +0100)
committerKevin Cristiano <kcristiano@tadpole.cc>
Thu, 10 May 2018 22:10:14 +0000 (18:10 -0400)
CRM/Export/Form/Select.php

index 6b77da8d0c4ced27e6b587593b7f979d23499844..ea0af7092921cc7ffcfba9fcb0b69e515aa10402 100644 (file)
@@ -70,6 +70,20 @@ class CRM_Export_Form_Select extends CRM_Core_Form {
 
   public $_componentTable;
 
+  /**
+   * Must be set to entity table name (eg. civicrm_participant) by child class
+   *
+   * @var string
+   */
+  static $tableName = NULL;
+
+  /**
+   * Must be set to entity shortname (eg. event)
+   *
+   * @var string
+   */
+  static $entityShortname = NULL;
+
   /**
    * Build all the data structures needed to build the form.
    *
@@ -120,6 +134,8 @@ class CRM_Export_Form_Select extends CRM_Core_Form {
       if (in_array($componentName[1], $components)) {
         $this->_exportMode = constant('CRM_Export_Form_Select::' . strtoupper($componentName[1]) . '_EXPORT');
         $className = "CRM_{$componentName[1]}_Form_Task";
+        $this::$entityShortname = $className::$entityShortname;
+        $this::$tableName = $className::$tableName;
         $className::preProcessCommon($this, !$isStandalone);
         $values = $this->controller->exportValues('Search');
       }