Merge pull request #23185 from eileenmcnaughton/smarty_wiz
[civicrm-core.git] / CRM / Import / Form / DataSourceConfig.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CRM
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
16 */
17
18 /**
19 * This class allows datasource specific fields to be added to the datasource form.
20 */
21 class CRM_Import_Form_DataSourceConfig extends CRM_Import_Forms {
22
23 /**
24 * Set variables up before form is built.
25 *
26 * @throws \CRM_Core_Exception
27 */
28 public function preProcess(): void {
29 $dataSourcePath = explode('_', $this->getDataSourceClassName());
30 $templateFile = 'CRM/Contact/Import/Form/' . $dataSourcePath[3] . '.tpl';
31 $this->assign('dataSourceFormTemplateFile', $templateFile ?? NULL);
32 }
33
34 /**
35 * Build the form object.
36 */
37 public function buildQuickForm(): void {
38 $this->buildDataSourceFields();
39 }
40
41 }