$className = 'CRM_' . $this->getComponent($this->get('entity')) . '_Task';
foreach ($className::tasks() as $taskId => $task) {
$taskForm = (array) $task['class'];
- if ($taskForm[0] == 'CRM_Export_Form_Select') {
+ if (strpos($taskForm[0], 'CRM_Export_Form_Select') === 0) {
$values['task'] = $taskId;
}
}
*/
protected $_mappingId;
+ /**
+ * Use the form name to create the tpl file name.
+ *
+ * @return string
+ */
+ public function getTemplateFileName() {
+ return 'CRM/Export/Form/Map.tpl';
+ }
+
/**
* Build the form object.
*/
public $_componentTable;
+ /**
+ * Use the form name to create the tpl file name.
+ *
+ * @return string
+ */
+ public function getTemplateFileName() {
+ return 'CRM/Export/Form/Select.tpl';
+ }
+
/**
* Build all the data structures needed to build the form.
*
*/
protected $queryMode = CRM_Contact_BAO_Query::MODE_CASE;
- /**
- * Use the form name to create the tpl file name.
- *
- * @return string
- */
- public function getTemplateFileName() {
- return 'CRM/Export/Form/Select.tpl';
- }
-
}
--- /dev/null
+<?php
+/*
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC. All rights reserved. |
+ | |
+ | This work is published under the GNU AGPLv3 license with some |
+ | permitted exceptions and without any warranty. For full license |
+ | and copyright information, see https://civicrm.org/licensing |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ *
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ */
+
+/**
+ * This class gets the name of the file to upload
+ */
+class CRM_Member_Export_Form_Map extends CRM_Export_Form_Map {
+
+}
--- /dev/null
+<?php
+/*
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC. All rights reserved. |
+ | |
+ | This work is published under the GNU AGPLv3 license with some |
+ | permitted exceptions and without any warranty. For full license |
+ | and copyright information, see https://civicrm.org/licensing |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ *
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ */
+
+/**
+ * This class gets the name of the file to upload
+ */
+class CRM_Member_Export_Form_Select extends CRM_Export_Form_Select {
+
+}
self::TASK_EXPORT => [
'title' => ts('Export members'),
'class' => [
- 'CRM_Export_Form_Select',
- 'CRM_Export_Form_Map',
+ 'CRM_Member_Export_Form_Select',
+ 'CRM_Member_Export_Form_Map',
],
'result' => FALSE,
],