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

  • AccountsGridViewProfileWidget
  • ActionMenu
  • ActionsGridViewProfileWidget
  • ActionsQuickCreateRelationshipBehavior
  • ActiveDateRangeInput
  • ApplicationConfigBehavior
  • Attachments
  • ChatBox
  • CommonControllerBehavior
  • ContactMapInlineTags
  • ContactsGridViewProfileWidget
  • CronForm
  • CSaveRelationsBehavior
  • DateRangeInputsWidget
  • DocsGridViewProfileWidget
  • DocViewer
  • DocViewerProfileWidget
  • EButtonColumnWithClearFilters
  • EmailDeliveryBehavior
  • EmailProgressControl
  • EncryptedFieldsBehavior
  • EventsChartProfileWidget
  • FileUploader
  • FontPickerInput
  • Formatter
  • FormView
  • GridViewWidget
  • History
  • IframeWidget
  • ImportExportBehavior
  • InlineActionForm
  • InlineEmailAction
  • InlineEmailForm
  • InlineEmailModelBehavior
  • InlineQuotes
  • JSONEmbeddedModelFieldsBehavior
  • JSONFieldsDefaultValuesBehavior
  • LeadRoutingBehavior
  • LeftWidget
  • LoginThemeHelper
  • LoginThemeHelperBase
  • MarketingGridViewProfileWidget
  • MediaBox
  • MessageBox
  • MobileFormatter
  • MobileFormLayoutRenderer
  • MobileLayoutRenderer
  • MobileLoginThemeHelper
  • MobileViewLayoutRenderer
  • ModelFileUploader
  • NewWebLeadsGridViewProfileWidget
  • NormalizedJSONFieldsBehavior
  • NoteBox
  • OnlineUsers
  • OpportunitiesGridViewProfileWidget
  • Panel
  • ProfileDashboardManager
  • ProfileGridViewWidget
  • ProfileLayoutEditor
  • ProfilesGridViewProfileWidget
  • Publisher
  • PublisherActionTab
  • PublisherCalendarEventTab
  • PublisherCallTab
  • PublisherCommentTab
  • PublisherEventTab
  • PublisherSmallCalendarEventTab
  • PublisherTab
  • PublisherTimeTab
  • QuickContact
  • QuickCreateRelationshipBehavior
  • QuotesGridViewProfileWidget
  • RecordAliasesWidget
  • RecordViewLayoutManager
  • RecordViewWidgetManager
  • RememberPagination
  • Reminders
  • ResponseBehavior
  • ResponsiveHtml
  • SearchIndexBehavior
  • ServicesGridViewProfileWidget
  • SmallCalendar
  • SmartActiveDataProvider
  • SmartDataProviderBehavior
  • SmartSort
  • SocialForm
  • SortableWidgetManager
  • SortableWidgets
  • TagBehavior
  • TagCloud
  • TemplatesGridViewProfileWidget
  • TimeZone
  • TopContacts
  • TopSites
  • TransformedFieldStorageBehavior
  • TranslationLogger
  • TwitterFeed
  • TwoColumnSortableWidgetManager
  • UpdaterBehavior
  • UpdatesForm
  • UserIdentity
  • UsersChartProfileWidget
  • WorkflowBehavior
  • X2ActiveGridView
  • X2ActiveGridViewForSortableWidgets
  • X2AssetManager
  • X2AuthManager
  • X2ChangeLogBehavior
  • X2ClientScript
  • X2Color
  • X2DateUtil
  • X2FixtureManager
  • X2FlowFormatter
  • X2GridView
  • X2GridViewBase
  • X2GridViewForSortableWidgets
  • X2GridViewSortableWidgetsBehavior
  • X2LeadsGridViewProfileWidget
  • X2LinkableBehavior
  • X2ListView
  • X2PillBox
  • X2ProgressBar
  • X2SmartSearchModelBehavior
  • X2TimestampBehavior
  • X2TranslationBehavior
  • X2UrlRule
  • X2WebModule
  • X2Widget
  • X2WidgetList
  • Overview
  • Package
  • Class
  • Tree

Class NormalizedJSONFieldsBehavior

Enables transparent serialization and storage of array objects in database fields as JSON strings.

CComponent
Extended by CBehavior implements IBehavior
Extended by CModelBehavior
Extended by CActiveRecordBehavior
Extended by TransformedFieldStorageBehavior
Extended by JSONFieldsBehavior
Extended by NormalizedJSONFieldsBehavior

Direct known subclasses

JSONFieldsDefaultValuesBehavior
Package: application\components
Author: Demitri Morgan <demitri@x2engine.com>, Derek Mueller <derek@x2engine.com>
Located at x2engine/protected/components/NormalizedJSONFieldsBehavior.php
Methods summary
public type
# fields( mixed $name )

Returns an array defining the expected structure of the JSON-bearing attribute specified by $name.

Returns an array defining the expected structure of the JSON-bearing attribute specified by $name.

Child classes can override this method to specify default values for fields in the embedded JSON object other than null (in this class, all embedded fields within all attributes are null by default).

Parameters

$name
mixed

Returns

type
public type
# packAttribute( type $name )

Normalizes the attribute array to the structure defined in NormalizedJSONFieldsBehavior::fields() and then JSON-encodes it to prepare it for saving.

Normalizes the attribute array to the structure defined in NormalizedJSONFieldsBehavior::fields() and then JSON-encodes it to prepare it for saving.

Parameters

$name
type
$name

Returns

type

Overrides

JSONFieldsBehavior::packAttribute()
public type
# unpackAttribute( string $name )

JSON-decodes the value stored in the database column for the attribute, and then normalizes it to the structure defined in NormalizedJSONFieldsBehavior::fields()

JSON-decodes the value stored in the database column for the attribute, and then normalizes it to the structure defined in NormalizedJSONFieldsBehavior::fields()

Parameters

$name
string
$name The attribute to be unpacked

Returns

type

Overrides

JSONFieldsBehavior::unpackAttribute()
Methods inherited from TransformedFieldStorageBehavior
afterFind(), afterSave(), beforeSave(), packAll(), unpackAll()
Methods inherited from CActiveRecordBehavior
afterDelete(), beforeCount(), beforeDelete(), beforeFind(), 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
protected mixed $_fields
#
protected type $hasOptions true
#

If true, specifies that the array TransformedFieldStorageBehavior::$transformAttributes has keys that refer to the attribute names and values referring to options for each attribute. Otherwise, it is a simple array containing attribute names.

If true, specifies that the array TransformedFieldStorageBehavior::$transformAttributes has keys that refer to the attribute names and values referring to options for each attribute. Otherwise, it is a simple array containing attribute names.

public boolean $maintainCurrentFieldsOrder false
#

If true, when setting the JSON field, the order of the current field values will be
maintained.

If true, when setting the JSON field, the order of the current field values will be maintained.

Param

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