X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FImport%2FParser.php;h=3c71a3ca33a1d485a6673d65be1d09759a3d10fe;hb=b1498fdac6ad37161424c6b48f3facf7936c8666;hp=6fab5498b9c4fa4762164f930e0fe0a88704aaee;hpb=e2350d0ddb5d20941e7b6b9c3cd3cb0d34c8b312;p=civicrm-core.git diff --git a/CRM/Import/Parser.php b/CRM/Import/Parser.php index 6fab5498b9..3c71a3ca33 100644 --- a/CRM/Import/Parser.php +++ b/CRM/Import/Parser.php @@ -137,6 +137,33 @@ abstract class CRM_Import_Parser { */ protected $_fields; + /** + * Metadata for all available fields, keyed by unique name. + * + * This is intended to supercede $_fields which uses a special sauce format which + * importableFieldsMetadata uses the standard getfields type format. + * + * @var array + */ + protected $importableFieldsMetadata = []; + + /** + * Get metadata for all importable fields in std getfields style format. + * + * @return array + */ + public function getImportableFieldsMetadata(): array { + return $this->importableFieldsMetadata; + } + + /** + * Set metadata for all importable fields in std getfields style format. + * @param array $importableFieldsMetadata + */ + public function setImportableFieldsMetadata(array $importableFieldsMetadata) { + $this->importableFieldsMetadata = $importableFieldsMetadata; + } + /** * Array of the fields that are actually part of the import process * the position in the array also dictates their position in the import