<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
protected $_parser;
+ /**
+ * @param null $tableName
+ * @param null $createSql
+ * @param bool $createTable
+ *
+ * @throws Exception
+ */
public function __construct($tableName = NULL, $createSql = NULL, $createTable = FALSE) {
$dao = new CRM_Core_DAO();
$db = $dao->getDatabaseConnection();
'mapperRelatedContactImProvider',
'mapperRelatedContactWebsiteType',
);
- foreach ($properties as $property) $this->{"_$property"} = array();
+ foreach ($properties as $property) { $this->{"_$property"} = array();
+ }
}
+ /**
+ * @return null|string
+ */
public function getTableName() {
return $this->_tableName;
}
+ /**
+ * @param bool $dropIfComplete
+ *
+ * @return bool
+ * @throws Exception
+ */
public function isComplete($dropIfComplete = TRUE) {
if (!$this->_statusFieldName) {
CRM_Core_Error::fatal("Could not get name of the import status field");
return TRUE;
}
+ /**
+ * @param array $params
+ */
public function setJobParams(&$params) {
foreach ($params as $param => $value) {
$fldName = "_$param";
}
}
+ /**
+ * @param CRM_Core_Form $form
+ * @param int $timeout
+ */
public function runImport(&$form, $timeout = 55) {
$mapper = $this->_mapper;
$mapperFields = array();
foreach ($mapper as $key => $value) {
//set respective mapper value to null.
- foreach (array_values($mapperPeroperties) as $perpertyVal)$$perpertyVal = NULL;
+ foreach (array_values($mapperPeroperties) as $perpertyVal) { $$perpertyVal = NULL;
+ }
$fldName = CRM_Utils_Array::value(0, $mapper[$key]);
$header = array($this->_mapFields[$fldName]);
}
}
+ /**
+ * @param $form
+ */
public function setFormVariables($form) {
$this->_parser->set($form, CRM_Import_Parser::MODE_IMPORT);
}
+ /**
+ * @param $contactIds
+ * @param string $newGroupName
+ * @param $newGroupDesc
+ *
+ * @return array|bool
+ */
private function _addImportedContactsToNewGroup($contactIds,
$newGroupName, $newGroupDesc
) {
return FALSE;
}
+ /**
+ * @param $contactIds
+ * @param string $newTagName
+ * @param $newTagDesc
+ *
+ * @return array|bool
+ */
private function _tagImportedContactsWithNewTag($contactIds,
$newTagName, $newTagDesc
) {
return FALSE;
}
+ /**
+ * @return array
+ */
public static function getIncompleteImportTables() {
$dao = new CRM_Core_DAO();
$database = $dao->database();
return $incompleteImportTables;
}
}
-