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 X2ModelConversionBehavior

Manages conversion between subclasses of X2Model

CComponent
Extended by CBehavior implements IBehavior
Extended by CModelBehavior
Extended by CActiveRecordBehavior
Extended by X2ModelConversionBehavior
Located at x2engine/protected/components/recordConversion/X2ModelConversionBehavior.php
Methods summary
public static
# getActions( )
public array
# getFieldMap( mixed $targetClass, mixed $flip = false )

Returns

array
field map for this class and the target class, or an empty array if no map exists.
public array
# mapFields( array $attributes, mixed $targetClass, mixed $associative = false )

Replace attribute names with the names they map to in the field map

Replace attribute names with the names they map to in the field map

Parameters

$attributes
boolean
$associative
$targetClass
$associative

Returns

array
public
# attributeNames( mixed $model )

Excludes fields whose values shouldn't be transferred to the target record

Excludes fields whose values shouldn't be transferred to the target record

public boolean
# checkConversionCompatibility( mixed $targetClass )

Returns

boolean
true if source and target types a conversion-compatible, false otherwise
public CModel|false
# convert( boolean $targetClass, mixed $force = false )

Uses the attributes of this model to generate a model of another type. This model is deleted.

Uses the attributes of this model to generate a model of another type. This model is deleted.

Parameters

$targetClass
boolean
$force If true, model will be converted even if there is potential for data loss
$force

Returns

CModel|false
public <array
# getConversionIncompatibilityWarnings( mixed $targetClass )

Returns

<array
of strings> Incompatibility warnings to be presented to the user before they convert this model to the target model.
public string
# errorSummary( mixed $targetModelClass, mixed $convertMultiple = false )

Renders error summary containing compatibility warnings

Renders error summary containing compatibility warnings

Returns

string
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 boolean $deleteConvertedRecord true
#
public string|null $convertedField
#

$convertedField

$convertedField

public string|null $conversionDateField
#

$conversionDateField

$conversionDateField

public string|null $convertedToTypeField
#

$convertedToTypeField

$convertedToTypeField

public string|null $convertedToIdField
#

$convertedToIdField

$convertedToIdField

public boolean $conversionFailed false
#

$conversionFailed

$conversionFailed

public null|X2Model $errorModel null
#

if conversion fails, this property gets set to the model that was attempted
to be saved. This gets used for displaying error output.

if conversion fails, this property gets set to the model that was attempted to be saved. This gets used for displaying error output.

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