Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • None
  • system
    • base
    • caching
    • console
    • db
      • ar
      • schema
    • validators
    • web
      • actions
      • auth
      • helpers
      • widgets
        • captcha
        • pagers
  • zii
    • widgets
      • grid

Classes

  • ActionFormModel
  • ArrayUtil
  • ArrayValidator
  • AssociatedMediaBehavior
  • AuxLib
  • Changelog
  • DetailView
  • EncryptUtilTmp
  • EventsWidgetFieldFormatter
  • FailedLogins
  • FieldFormatter
  • FieldFormatterBase
  • FieldInputRenderer
  • FileFieldBehavior
  • FiltersForm
  • FilterUtil
  • FineDiff
  • FineDiffCopyOp
  • FineDiffDeleteOp
  • FineDiffInsertOp
  • FineDiffOp
  • FineDiffOps
  • FineDiffReplaceOp
  • GlobalCSSFormModel
  • GlobalImportFormModel
  • GoogleAuthenticator
  • JSONFieldsBehavior
  • JSONResponse
  • MediaFieldFormatter
  • MediaSelector
  • MobileActiveRecordFieldFormatter
  • MobileActivityFeed
  • MobileChartDashboard
  • MobileFieldFormatter
  • MobileFieldInputRenderer
  • ModuleModelNameValidator
  • MultiChildNode
  • MultiTypeAutocomplete
  • PasswordUtil
  • ProductFeature
  • ProfileWidgetLayout
  • QueryParamGenerator
  • RecordLimitBehavior
  • RecordView
  • RecordViewWidgetLayout
  • RelationshipsGridModel
  • RelationshipsJoin
  • RepairUserDataCommand
  • RequestUtil
  • RequiredIfNotSetValidator
  • ResponseUtil
  • RunMigrationScriptCommand
  • ServiceWebFormDesigner
  • Settings
  • StringUtil
  • TestEmailAction
  • TestEmailActionForm
  • ThemeGenerator
  • TimerUtil
  • TopicsFieldFormatter
  • TopicsWidgetLayout
  • TransactionalViewFieldFormatter
  • UrlUtil
  • ValidLinkValidator
  • WebFormDesigner
  • WebLeadFormDesigner
  • X2ActiveRecordBehavior
  • X2ActiveRecordFieldFormatter
  • X2ButtonColumn
  • X2ConditionList
  • X2ConsoleCommand
  • X2ControllerBehavior
  • X2DataColumn
  • X2DuplicateBehavior
  • X2Flashes
  • X2GridViewFieldFormatter
  • X2IPAddress
  • X2LeadsDataColumn
  • X2MergeableBehavior
  • X2MessageSource
  • X2MobileControllerBehavior
  • X2MobileProfileControllerBehavior
  • X2MobileQuotesControllerBehavior
  • X2MobileSiteControllerBehavior
  • X2MobileTopicsControllerBehavior
  • X2ModelConversionBehavior
  • X2ModelConversionWidget
  • X2ModelForeignKeyValidator
  • X2ModelUniqueIndexValidator
  • X2NonWebUser
  • X2StaticDropdown
  • X2StaticField
  • X2StaticFieldsBehavior
  • X2UrlManager
  • X2Validator
  • X2WidgetBehavior

Interfaces

  • AdminOwnedCredentials

Exceptions

  • CampaignMailingException
  • CodeExchangeException
  • GetCredentialsException
  • NoRefreshTokenException
  • NoUserIdException
  • StringUtilException

Functions

  • checkCurrency
  • checkDNS
  • checkServerVar
  • checkTimezone
  • decodeQuotes
  • echoIcons
  • encodeQuotes
  • exceptionForError
  • getField
  • getLanguageName
  • getModuleTitle
  • handleReqError
  • handleReqException
  • installer_t
  • installer_tr
  • isAllowedDir
  • mediaMigrationRrmdir
  • migrateMediaDir
  • printGraph
  • printR
  • renderFields
  • reqShutdown
  • RIP
  • translateOptions
  • tryGetRemote
  • Overview
  • Package
  • Class
  • Tree

Class X2MergeableBehavior

Behavior to define the set of methods necessary to merge two or more records into a single record. Should always be implemented on records which have X2DuplicateBehavior but is more general in its application.

CComponent
Extended by CBehavior implements IBehavior
Extended by CModelBehavior
Extended by CActiveRecordBehavior
Extended by X2MergeableBehavior
Located at x2engine/protected/components/X2MergeableBehavior.php
Methods summary
public
# setMergedField( Fields $field, array $duplicates )

Set the value of $this->owner->{$field->fieldName} to the merged value from the set of duplicates. The value will be set to the value of the duplicate which has a non-null value for this field and the most recent lastUpdated value.

Set the value of $this->owner->{$field->fieldName} to the merged value from the set of duplicates. The value will be set to the value of the duplicate which has a non-null value for this field and the most recent lastUpdated value.

Parameters

$field
Fields
$field The field object determining which field to set
$duplicates
array
$duplicates Records to set the value from
public
# setMergedCreateDate( array $duplicates )

Set the createDate value of $this->owner to the oldest createDate of the duplicates

Set the createDate value of $this->owner to the oldest createDate of the duplicates

Parameters

$duplicates
array
$duplicates
public
# massMergeRelatedRecords( array $duplicates, boolean $logMerge )

Wrapper for mergeRelatedRecords to merge each duplicate into the new record and hide the duplicate.

Wrapper for mergeRelatedRecords to merge each duplicate into the new record and hide the duplicate.

Parameters

$duplicates
array
$duplicates Records to be merged into $this->owner
$logMerge
boolean
$logMerge Whether to log merge information so it can be undone
public
# mergeRelatedRecords( X2Model $model, mixed $logMerge = false )

Transfers all events, notifications, and actions, tags, relationships, and lookup fields related to the given $model to $this->owner.

Transfers all events, notifications, and actions, tags, relationships, and lookup fields related to the given $model to $this->owner.

public
# mergeActions( X2Model $model, mixed $logMerge = false )

Transfers all related Actions from $model to $this->owner

Transfers all related Actions from $model to $this->owner

public
# mergeEvents( X2Model $model, mixed $logMerge = false )

Transfers all related Events from $model to $this->owner

Transfers all related Events from $model to $this->owner

public
# mergeNotifications( X2Model $model, mixed $logMerge = false )

Transfers all related Notifications from $model to $this->owner

Transfers all related Notifications from $model to $this->owner

public
# mergeTags( X2Model $model, mixed $logMerge = false )

Transfers all tags from $model to $this->owner

Transfers all tags from $model to $this->owner

public
# mergeRelationships( X2Model $model, mixed $logMerge = false )

Transfers all relationships of $model to $this->owner

Transfers all relationships of $model to $this->owner

public
# mergeLinkFields( X2Model $model, mixed $logMerge = false )

Transfers link fields pointing to $model to $htis->owner

Transfers link fields pointing to $model to $htis->owner

public
# revertMerge( )

Undo a merge based on merge log data stored during the merge process. Should only be called by models which have a corresponding merge log entry. Most helper functions are simpler than their merge counterparts because related records can be transferred between different record types, but actual merges (which are capable of being undone) can only be performed on records of the same type.

Undo a merge based on merge log data stored during the merge process. Should only be called by models which have a corresponding merge log entry. Most helper functions are simpler than their merge counterparts because related records can be transferred between different record types, but actual merges (which are capable of being undone) can only be performed on records of the same type.

public
# unmergeActions( mixed $id, mixed $actionIds )
public
# unmergeEvents( mixed $id, mixed $eventIds )
public
# unmergeNotifications( mixed $id, mixed $notifIds )
public
# unmergeTags( mixed $id, mixed $tags )
public
# unmergeRelationships( mixed $id, mixed $data )
public
# unmergeLinkFields( mixed $id, mixed $data )
Methods inherited from CActiveRecordBehavior
afterDelete(), afterFind(), afterSave(), beforeCount(), beforeDelete(), beforeFind(), beforeSave(), events()
Methods inherited from CModelBehavior
afterConstruct(), afterValidate(), beforeValidate()
Methods inherited from CBehavior
attach(), detach(), getEnabled(), getOwner(), setEnabled()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public array $restrictedFields array( 'id', 'nameId', )
#

Fields which should not be set from old records in a merge.

Fields which should not be set from old records in a merge.

Magic properties inherited from CActiveRecordBehavior
$owner
Magic properties inherited from CBehavior
$enabled
X2CRM Documentation API documentation generated by ApiGen 2.8.0