Exemplo n.º 1
0
 /**
  * Store parser values.
  *
  * @param CRM_Core_Session $store
  *
  * @param int $mode
  *
  * @return void
  */
 public function set($store, $mode = self::MODE_SUMMARY)
 {
     $store->set('fileSize', $this->_fileSize);
     $store->set('lineCount', $this->_lineCount);
     $store->set('seperator', $this->_seperator);
     $store->set('fields', $this->getSelectValues());
     $store->set('fieldTypes', $this->getSelectTypes());
     $store->set('headerPatterns', $this->getHeaderPatterns());
     $store->set('dataPatterns', $this->getDataPatterns());
     $store->set('columnCount', $this->_activeFieldCount);
     $store->set('totalRowCount', $this->_totalCount);
     $store->set('validRowCount', $this->_validCount);
     $store->set('invalidRowCount', $this->_invalidRowCount);
     $store->set('conflictRowCount', $this->_conflictCount);
     switch ($this->_contactType) {
         case 'Individual':
             $store->set('contactType', CRM_Import_Parser::CONTACT_INDIVIDUAL);
             break;
         case 'Household':
             $store->set('contactType', CRM_Import_Parser::CONTACT_HOUSEHOLD);
             break;
         case 'Organization':
             $store->set('contactType', CRM_Import_Parser::CONTACT_ORGANIZATION);
     }
     if ($this->_invalidRowCount) {
         $store->set('errorsFileName', $this->_errorFileName);
     }
     if ($this->_conflictCount) {
         $store->set('conflictsFileName', $this->_conflictFileName);
     }
     if (isset($this->_rows) && !empty($this->_rows)) {
         $store->set('dataValues', $this->_rows);
     }
     if ($mode == self::MODE_IMPORT) {
         $store->set('duplicateRowCount', $this->_duplicateCount);
         if ($this->_duplicateCount) {
             $store->set('duplicatesFileName', $this->_duplicateFileName);
         }
     }
 }
Exemplo n.º 2
0
 /**
  * Store the variable with the value in the form scope
  *
  * @param  string|array $name  name  of the variable or an assoc array of name/value pairs
  * @param  mixed        $value value of the variable if string
  *
  * @access public
  *
  * @return void
  *
  */
 function set($name, $value = NULL)
 {
     self::$_session->set($name, $value, $this->_scope);
 }
Exemplo n.º 3
0
 /**
  * Store parser values.
  *
  * @param CRM_Core_Session $store
  *
  * @param int $mode
  */
 public function set($store, $mode = self::MODE_SUMMARY)
 {
     $store->set('fileSize', $this->_fileSize);
     $store->set('lineCount', $this->_lineCount);
     $store->set('seperator', $this->_seperator);
     $store->set('fields', $this->getSelectValues());
     $store->set('fieldTypes', $this->getSelectTypes());
     $store->set('headerPatterns', $this->getHeaderPatterns());
     $store->set('dataPatterns', $this->getDataPatterns());
     $store->set('columnCount', $this->_activeFieldCount);
     $store->set('totalRowCount', $this->_totalCount);
     $store->set('validRowCount', $this->_validCount);
     $store->set('invalidRowCount', $this->_invalidRowCount);
     $store->set('conflictRowCount', $this->_conflictCount);
     if ($this->_invalidRowCount) {
         $store->set('errorsFileName', $this->_errorFileName);
     }
     if ($this->_conflictCount) {
         $store->set('conflictsFileName', $this->_conflictFileName);
     }
     if (isset($this->_rows) && !empty($this->_rows)) {
         $store->set('dataValues', $this->_rows);
     }
     if ($mode == self::MODE_IMPORT) {
         $store->set('duplicateRowCount', $this->_duplicateCount);
         if ($this->_duplicateCount) {
             $store->set('duplicatesFileName', $this->_duplicateFileName);
         }
     }
 }
Exemplo n.º 4
0
 /**
  * Store the variable with the value in the form scope.
  *
  * @param string|array $name name of the variable or an assoc array of name/value pairs
  * @param mixed $value
  *   Value of the variable if string.
  *
  *
  * @return void
  */
 public function set($name, $value = NULL)
 {
     self::$_session->set($name, $value, $this->_name);
 }
Exemplo n.º 5
0
 /**
  * Store the variable with the value in the form scope
  *
  * @param  string|array $name  name  of the variable or an assoc array of name/value pairs
  * @param  mixed        $value value of the variable if string
  *
  * @access public
  * @return void
  *
  */
 function set($name, $value = null)
 {
     self::$_session->set($name, $value, $this->_name);
 }
Exemplo n.º 6
0
 /**
  * Store parser values
  *
  * @param CRM_Core_Session $store
  *
  * @return void
  * @access public
  */
 function set($store, $mode = self::MODE_SUMMARY)
 {
     $store->set('rowCount', $this->_rowCount);
     $store->set('fields', $this->getSelectValues());
     $store->set('fieldTypes', $this->getSelectTypes());
     $store->set('columnPatterns', $this->getColumnPatterns());
     $store->set('dataPatterns', $this->getDataPatterns());
     $store->set('columnCount', $this->_activeFieldCount);
     $store->set('totalRowCount', $this->_totalCount);
     $store->set('validRowCount', $this->_validCount);
     $store->set('invalidRowCount', $this->_invalidRowCount);
     $store->set('conflictRowCount', $this->_conflictCount);
     $store->set('unMatchCount', $this->_unMatchCount);
     switch ($this->_contactType) {
         case 'Individual':
             $store->set('contactType', CRM_Import_Parser::CONTACT_INDIVIDUAL);
             break;
         case 'Household':
             $store->set('contactType', CRM_Import_Parser::CONTACT_HOUSEHOLD);
             break;
         case 'Organization':
             $store->set('contactType', CRM_Import_Parser::CONTACT_ORGANIZATION);
     }
     if ($this->_invalidRowCount) {
         $store->set('errorsFileName', $this->_errorFileName);
     }
     if ($this->_conflictCount) {
         $store->set('conflictsFileName', $this->_conflictFileName);
     }
     if (isset($this->_rows) && !empty($this->_rows)) {
         $store->set('dataValues', $this->_rows);
     }
     if ($this->_unMatchCount) {
         $store->set('mismatchFileName', $this->_misMatchFilemName);
     }
     if ($mode == self::MODE_IMPORT) {
         $store->set('duplicateRowCount', $this->_duplicateCount);
         $store->set('unparsedAddressCount', $this->_unparsedAddressCount);
         if ($this->_duplicateCount) {
             $store->set('duplicatesFileName', $this->_duplicateFileName);
         }
         if ($this->_unparsedAddressCount) {
             $store->set('errorsFileName', $this->_errorFileName);
         }
     }
     //echo "$this->_totalCount,$this->_invalidRowCount,$this->_conflictCount,$this->_duplicateCount";
 }