-
-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
/** | ||
* @package CRM | ||
* @copyright CiviCRM LLC https://civicrm.org/licensing | ||
*/ | ||
|
||
/** | ||
* Placeholder class retained for legacy compatibility. | ||
*/ | ||
class CRM_Core_DAO_ImportTemplateField extends CRM_Core_DAO_Base { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?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 | | ||
+--------------------------------------------------------------------+ | ||
*/ | ||
namespace Civi\Api4; | ||
|
||
/** | ||
* ImportTemplateField entity - stores field mappings for import templates. | ||
* | ||
* @see \Civi\Api4\UFGroup | ||
* @orderBy column_number | ||
* @groupWeightsBy user_job_id | ||
* @since 5.82 | ||
* @package Civi\Api4 | ||
*/ | ||
class ImportTemplateField extends Generic\DAOEntity { | ||
use Generic\Traits\SortableEntity; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
|
||
return [ | ||
'name' => 'ImportTemplateField', | ||
'table' => 'civicrm_import_template_field', | ||
'class' => 'CRM_Core_DAO_ImportTemplateField', | ||
'getInfo' => fn() => [ | ||
'title' => ts('Import Template Field'), | ||
'title_plural' => ts('Import Template Fields'), | ||
'description' => ts('Individual field for an import template'), | ||
'add' => '5.82', | ||
], | ||
'getFields' => fn() => [ | ||
'id' => [ | ||
'title' => ts('Field ID'), | ||
'sql_type' => 'int unsigned', | ||
'input_type' => 'Number', | ||
'required' => TRUE, | ||
'add' => '5.82', | ||
'primary_key' => TRUE, | ||
'auto_increment' => TRUE, | ||
], | ||
'user_job_id' => [ | ||
'title' => ts('Job ID'), | ||
'sql_type' => 'int unsigned', | ||
'input_type' => 'EntityRef', | ||
'required' => TRUE, | ||
'description' => ts('Template to which this field belongs'), | ||
'add' => '5.82', | ||
'input_attrs' => [ | ||
'label' => ts('Template'), | ||
], | ||
'entity_reference' => [ | ||
'entity' => 'UserJob', | ||
'key' => 'id', | ||
'on_delete' => 'CASCADE', | ||
], | ||
], | ||
'name' => [ | ||
'title' => ts('Field Name'), | ||
'sql_type' => 'varchar(1024)', | ||
'input_type' => 'Text', | ||
'description' => ts('Template field key'), | ||
'add' => '5.82', | ||
], | ||
'column_number' => [ | ||
'title' => ts('Column Number to map to'), | ||
'sql_type' => 'int unsigned', | ||
'input_type' => 'Number', | ||
'required' => TRUE, | ||
'description' => ts('Column number for the import dataset'), | ||
'add' => '5.82', | ||
], | ||
'default_value' => [ | ||
'title' => ts('Default Value'), | ||
'sql_type' => 'varchar(1024)', | ||
'input_type' => 'Text', | ||
'description' => ts('SQL WHERE value for search-builder mapping fields.'), | ||
'add' => '5.82', | ||
], | ||
'entity_data' => [ | ||
'title' => ts('Entity Data'), | ||
'sql_type' => 'text', | ||
'input_type' => 'TextArea', | ||
'description' => ts('Configuration data for the field'), | ||
'add' => '5.82', | ||
'default' => NULL, | ||
'serialize' => CRM_Core_DAO::SERIALIZE_JSON, | ||
], | ||
], | ||
]; |