include/connectors/sources/default/source.php

Show: inherited
Table of Contents

\source

Package: SugarCRM

source is the parent class of any source object.

Children
\ext_eapm_webex
\ext_eapm_facebook
\ext_eapm_lotuslive
\ext_eapm_gotomeeting
\ext_eapm_google
\loc_xml
\ext_eapm
\ext_soap
\ext_rest
Api
 

Properties

Propertyprotected  $_config= ''
Details
Type
n/a
Propertyprotected\_eapm  $_eapm= 'null'

The ExternalAPI Base that instantiated this connector.

Default valuenullDetails
Type
\_eapm
Propertyprotectedbool  $_enable_in_admin_display= 'true'

enable_in_admin_display Boolean value marking whether or not this connector should appear in the Enable Connectors view
Default valuetrueDetails
Type
bool
Propertyprotectedbool  $_enable_in_admin_mapping= 'true'

enable_in_admin_mapping Boolean value marking whether or not this connector should be shown in the Modify Mapping view
Default valuetrueDetails
Type
bool
Propertyprotectedbool  $_enable_in_admin_properties= 'true'

enable_in_admin_properties Boolean value marking whether or not this connector should appear in the Set Connector Properties view
Default valuetrueDetails
Type
bool
Propertyprotectedbool  $_enable_in_admin_search= 'true'

enable_in_admin_search Boolean value marking whether or not this connector should appear in the Manage Connector Search view
Default valuetrueDetails
Type
bool
Propertyprotectedbool  $_enable_in_hover= 'false'

enable_in_hover Boolean value marking whether or not a hover link could be applied to the connector
Default valuefalseDetails
Type
bool
Propertyprotectedbool  $_enable_in_wizard= 'true'

enable_in_wizard Boolean value marking whether or not the connector may appear in the wizard (Get Data) views
Default valuetrueDetails
Type
bool
Propertyprotected  $_field_defs= ''
Details
Type
n/a
Propertyprotectedbool  $_has_testing_enabled= 'false'

has_testing_enabled Boolean value marking whether or not the connector should display the test button in administration view
Default valuefalseDetails
Type
bool
Propertyprotected  $_mapping= ''
Details
Type
n/a
Propertyprotected  $_required_config_fields= 'array()'
Default valuearray()Details
Type
n/a
Propertyprotected  $_required_config_fields_for_button= 'array()'
Default valuearray()Details
Type
n/a
Propertyprotected  $config_decrypted= 'false'
Default valuefalseDetails
Type
n/a
Propertypublic  $wrapperName= ''

The name of an wrapper to use if the class wants to provide an override

Details
Type
n/a

Methods

methodpublic__construct( ) : void

methodpublic__destruct( ) : void

Default destructor

methodpublicfilterAllowedModules( array $moduleList ) : array

Filter which modules are allowed to connect

Parameters
Name Type Description
$moduleList array
Returns
Type Description
array Allowed modules
methodpublicgetConfig( ) : void

methodpublicgetEAPM( ) : void

methodpublicgetFieldDefs( ) : void

methodpublicgetFieldsWithParams( string $param_name, string $param_value ) : array

Given a parameter in a vardef field, return the list of fields that match the param and value

Parameters
Name Type Description
$param_name string
$param_value string
Returns
Type Description
array
methodpublicgetItem( \$args $args = array(), \$module $module = null ) : Array
abstract

getItem Returns an array containing a key/value pair(s) of a connector record. To be overridden by the implementation source.

Parameters
Name Type Description
$args \$args

Array of arguments to search/filter by

$module \$module

String optional value of the module that the connector framework is attempting to map to

Returns
Type Description
Array of key/value pair(s) of connector record; empty Array if no results are found
methodpublicgetList( \$args $args = array(), \$module $module = null ) : Array
abstract

getList Returns a nested array containing a key/value pair(s) of a connector record. To be overridden by the implementation source.

Parameters
Name Type Description
$args \$args

Array of arguments to search/filter by

$module \$module

String optional value of the module that the connector framework is attempting to map to

Returns
Type Description
Array of key/value pair(s) of connector record; empty Array if no results are found
methodpublicgetMapping( ) : void

methodpublicgetOriginalMapping( ) : void

methodpublicgetProperties( ) : void

methodpublicgetProperty(  $name ) : void

Parameters
Name Type Description
$name
methodpublicgetRequiredConfigFields( ) : \$fields

getRequiredConfigFields This method returns an Array of the configuration keys that are required for the Connector.

Subclasses should set the class variable _required_config_fields to return an Array of keys as specified in the Connector's config.php that are required.

Returns
Type Description
\$fields Array of Connector config fields that are required
methodpublicgetRequiredConfigFieldsForButton( ) : \$fields

getRequiredConfigFieldsForButton This method returns an Array of the configuration keys that are required before the "Get Data" button will include the Connector. We use it as a subset of the $this->_required_config_fields Array.

Returns
Type Description
\$fields Array of Connector config fields that are required to be set for the "Get Data" button to appear
methodpublichasTestingEnabled( ) : \enabled

hasTestingEnabled This method is used to indicate whether or not a data source has testing enabled so that the administration interface may call the test method on the data source instance

Returns
Type Description
\enabled boolean value indicating whether or not testing is enabled
methodpublicinit( ) : void

methodpublicinitConfig( ) : void

Initialize config - decrypt encrypted fields

methodpublicisEnabledInAdminDisplay( ) : boolean

isEnabledInAdminDisplay This method indicates whether or not the connector should be shown in the Enable Connectors view.

The Admin views call each source's isEnabledInAdminDisplay method to verify whether or not the connector should be displayed. Connectors that do not have any administrative display settings should set the protected class variable _enable_in_admin_display to false.

Returns
Type Description
boolean value indicating whether or not the connector is enabled for admin views
methodpublicisEnabledInAdminMapping( ) : boolean

isEnabledInAdminMapping This method indicates whether or not the connector should be shown in the Map Connector Fields view.

The Admin views call each source's isEnabledInAdminMapping method to verify whether or not the connector should be displayed. Connectors that do not have any administrative mapping properties should set the protected class variable _enable_in_admin_mapping to false.

Returns
Type Description
boolean value indicating whether or not the connector is enabled for admin views
methodpublicisEnabledInAdminProperties( ) : boolean

isEnabledInAdminProperties This method indicates whether or not the connector should be shown in the Set Connector Properties view.

The Admin views call each source's isEnabledInAdminProperties method to verify whether or not the connector should be displayed. Connectors that do not have any administrative properties should set the protected class variable _enable_in_admin_properties to false.

Returns
Type Description
boolean value indicating whether or not the connector is enabled for admin views
methodpublicisEnabledInAdminSearch( ) : boolean

isEnabledInAdminSearch This method indicates whether or not the connector should be shown in the Manage Connectors Search view.

The Admin views call each source's isEnabledInAdminSearch method to verify whether or not the connector should be displayed. Connectors that do not have any administrative search settings should set the protected class variable _enable_in_admin_search to false.

Returns
Type Description
boolean value indicating whether or not the connector is enabled for admin views
methodpublicisEnabledInHover( ) : \$enabled

isEnabledInHover This method indicates whether or not the connector should be enabled for the hover links Connectors that do not provide a formatter implementation should not set the protected class variable _enable_in_hover to true.

Returns
Type Description
\$enabled boolean variable indicating whether or not the connector is enabled for the hover links
methodpublicisEnabledInWizard( ) : \$enabled

isEnabledInWizard This method indicates whether or not the connector should be enabled in the wizard Connectors that do not support the getList/getItem methods via API calls should set the protected class variable _enable_in_wizard to false.

Returns
Type Description
\$enabled boolean variable indicating whether or not the connector is enabled for the wizard
methodpublicisRequiredConfigFieldsForButtonSet( ) : \$set

isRequiredConfigFieldsForButtonSet This method checks the configuration parameters against the required config fields for the "Get Button" to see if they are set

Returns
Type Description
\$set boolean value indicating whether or not the required config fields are set
methodpublicisRequiredConfigFieldsSet( ) : \$set

isRequiredConfigFieldsSet This method checks the configuration parameters against the required config fields to see if they are set

Returns
Type Description
\$set boolean value indicating whether or not the required config fields are set
methodpublicloadConfig( ) : void

Load config.php for this source

methodpublicloadMapping( ) : void

methodpublicloadVardefs( ) : void

Load source's vardef file

methodprotectedlog( string $log_data ) : void

Allow data sources to log information

Parameters
Name Type Description
$log_data string
methodpublicpropertyExists( string $name ) : bool

Check if certain property contains non-empty value

Parameters
Name Type Description
$name string
Returns
Type Description
bool
methodpublicsaveConfig( ) : void

Save source's config to custom directory

methodpublicsaveMappingHook(  $mapping ) : void

Parameters
Name Type Description
$mapping
methodpublicsetConfig(  $config ) : void

Parameters
Name Type Description
$config
methodpublicsetEAPM(  $eapm ) : void

Parameters
Name Type Description
$eapm
methodpublicsetMapping(  $mapping ) : void

Parameters
Name Type Description
$mapping
methodpublicsetProperties(  $properties = array() ) : void

Parameters
Name Type Description
$properties
methodpublictest( ) : \result

test This method is called from the administration interface to run a test of the service It is up to subclasses to implement a test and set _has_testing_enabled to true so that a test button is rendered in the administration interface

Returns
Type Description
\result boolean result of the test function
Documentation was generated by DocBlox 0.18.1.