Documentation

civiimport.php

Table of Contents

Functions

civiimport_civicrm_config()  : mixed
Implements hook_civicrm_config().
civiimport_civicrm_install()  : mixed
Implements hook_civicrm_install().
civiimport_civicrm_enable()  : mixed
Implements hook_civicrm_enable().
civiimport_civicrm_entityTypes()  : void
Implements hook_civicrm_entityTypes().
_civiimport_civicrm_get_import_tables()  : array<string|int, mixed>
Get the available import tables.
civiimport_civicrm_alterTemplateFile()  : void
Alter the template for the contribution import mapping to use angular form.
civiimport_civicrm_searchKitTasks()  : mixed
Implements search tasks hook to add the `validate` and `import` actions.
civiimport_civicrm_buildForm()  : mixed
Load the angular app for our form.

Functions

civiimport_civicrm_entityTypes()

Implements hook_civicrm_entityTypes().

civiimport_civicrm_entityTypes(array<string|int, mixed> &$entityTypes) : void

Declare each import table as an entity type. This function was intended to be in the ImportSubscriber class but kept getting errors when it was there so it's here, at least for now.

Parameters
$entityTypes : array<string|int, mixed>
Tags
link
https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes

_civiimport_civicrm_get_import_tables()

Get the available import tables.

_civiimport_civicrm_get_import_tables() : array<string|int, mixed>

Note this lives here as entityTypes hook calls it - which may not fully have class loading set up by the time it runs.

Where the database is fully booted already it is better to call Civi\BAO\Import::getImportTables() which is expected to have caching.

Currently both functions share the Civi::statics caching in this function - but we have had lots of back & forth so the principle is - call this if we know caching could be scary - call the other for 'whatever caching is most performant'.

Return values
array<string|int, mixed>

civiimport_civicrm_alterTemplateFile()

Alter the template for the contribution import mapping to use angular form.

civiimport_civicrm_alterTemplateFile(string $formName, CRM_Core_Form $form, string $type, string &$templateFile) : void
Parameters
$formName : string
$form : CRM_Core_Form
$type : string
$templateFile : string
Tags
noinspection

PhpUnusedParameterInspection

throws
CRM_Core_Exception

civiimport_civicrm_searchKitTasks()

Implements search tasks hook to add the `validate` and `import` actions.

civiimport_civicrm_searchKitTasks(array<string|int, mixed> &$tasks, bool $checkPermissions, int|null $userId) : mixed
Parameters
$tasks : array<string|int, mixed>
$checkPermissions : bool
$userId : int|null
Tags
noinspection

PhpUnused


        
On this page

Search results