\org_openpsa_directmarketing_importer_simpleemails

Simle Email Importer for subscribers

Note, that the request data, for ease of use, already contains the L10n Databases of the Component and MidCOM itself located in this class. They are stored as 'l10n' and 'l10n_midcom'. Also available as 'config' is the current component configuration.

Summary

Methods
Properties
Constants
__construct()
parse()
import_subscribers()
__get()
__isset()
set_active_leaf()
add_stylesheet()
get_workflow()
$_component
$_i18n
$_l10n
$_l10n_midcom
$_config
No constants found
No protected methods found
$_schemadbs
$_settings
N/A
_datamanager_process()
_clean_new_objects()
_import_subscribers_person()
_import_subscribers_campaign_member()
_import_subscribers_organization()
_import_subscribers_organization_member()
$_datamanagers
$_new_objects
$_import_status
$_services
N/A

Properties

$_component

$_component : string

The name of the component, e.g. net.nehmer.static. Should be used whenever the component's name is required instead of hardcoding it.

Type

string

$_i18n

$_i18n : \midcom_services_i18n

A handle to the i18n service.

Type

\midcom_services_i18n

$_l10n

$_l10n : \midcom_services_i18n_l10n

The components' L10n string database.

Type

\midcom_services_i18n_l10n

$_l10n_midcom

$_l10n_midcom : \midcom_services_i18n_l10n

The global MidCOM string database.

Type

\midcom_services_i18n_l10n

$_config

$_config : \midcom_helper_configuration

The current configuration.

Type

\midcom_helper_configuration

$_schemadbs

$_schemadbs : array<mixed,\midcom\datamanager\schemadb>

The schema databases used for importing to various objects like persons and organizations

Type

array<mixed,\midcom\datamanager\schemadb>

$_settings

$_settings : array

Importer configuration, if any

Type

array

$_datamanagers

$_datamanagers : array<mixed,\midcom\datamanager\datamanager>

Datamanagers used for saving various objects like persons and organizations

Type

array<mixed,\midcom\datamanager\datamanager>

$_new_objects

$_new_objects : array

Object registry

Type

array

$_import_status

$_import_status : array

Status table

Type

array

$_services

$_services : array

Array that holds the already instantiated services

Type

array

Methods

__construct()

__construct() 

Initialize all member variables, remember to set $_component before calling this constructor from your derived classes.

parse()

parse(mixed  $input) : array

Converts input into the importer array format

Parameters

mixed $input

Returns

array

import_subscribers()

import_subscribers(array  $subscribers, \org_openpsa_directmarketing_campaign_dba  $campaign) : array

Takes an array of new subscribers and processes each of them using datamanager.

Parameters

array $subscribers

The subscribers to import

\org_openpsa_directmarketing_campaign_dba $campaign

The campaign to import into

Returns

array —

Import status

__get()

__get(  $field) 

Parameters

$field

__isset()

__isset(  $field) 

Parameters

$field

set_active_leaf()

set_active_leaf(  $leaf_id) 

Parameters

$leaf_id

add_stylesheet()

add_stylesheet(string  $url, string  $media = false) 

Convenience shortcut for adding CSS files

Parameters

string $url

The stylesheet URL

string $media

The media type(s) for the stylesheet, if any

get_workflow()

get_workflow(string  $identifier, array  $options = array()) : \midcom\workflow\dialog

Parameters

string $identifier
array $options

Returns

\midcom\workflow\dialog

_datamanager_process()

_datamanager_process(string  $type, array  $subscriber, \midcom_core_dbaobject  $object) 

Process the datamanager

Parameters

string $type

Subscription type

array $subscriber
\midcom_core_dbaobject $object

_clean_new_objects()

_clean_new_objects() 

Clean the new objects

_import_subscribers_person()

_import_subscribers_person(array  $subscriber) 

Parameters

array $subscriber

_import_subscribers_organization()

_import_subscribers_organization(array  $subscriber) 

Parameters

array $subscriber