ContentBlockEditorViewModel (constructor)

Location

Used across all instances a hash to cache attribute names and their getter
and setter names.

_contentStructureStore

_currentContext

_waitingForContext

autoLoadStatus

Set it to true of the status information should be automatically loaded when the contentLink is set

contentGroup

contentLink

index

name

roleIdentities

selected

statusIcon

Store content status icon classes

statusMessage

Store content status message.
Can be [String] or [Array] data type.

Methods

_changeAttrValue ( name , value
)

Internal helper for directly changing an attribute value.

Parameters

Name

Summary

Type

Usage

name

The property to set.

String

required

value

The value to set in the property.

Mixed

required

_contentLinkSetter ( contentLink
)

Content Link setter

Parameters

Name

Summary

Type

Usage

contentLink

[String]

required

_contentSetter ( content
)

Parameters

Name

Summary

Type

Usage

content

undefined

required

_contentStatusSetter ( status
)

Parameters

Name

Summary

Type

Usage

status

Content status

[Integer]

required

_contextChanged ( _11 , _12
)

Parameters

Name

Summary

Type

Usage

_11

undefined

required

_12

undefined

required

_get ( name , names
)

Private function that does a get based off a hash of names

Parameters

Name

Summary

Type

Usage

name

undefined

required

names

Hash of names of custom attributes

undefined

required

_getStatusMessage ( )

Get content version status message.
Override this function to customize content status message.

_initialContextChanged ( _13 , _14
)

Parameters

Name

Summary

Type

Usage

_13

undefined

required

_14

undefined

required

_isDeletedGetter ( )

_isTranslationNeededGetter ( )

_isVisibleOnSiteGetter ( )

Allow create additional information area or not.
Based on content version status.

_missingLanguageBranchGetter ( )

constructor ( )

contextChanged ( _c , _d
)

Parameters

Name

Summary

Type

Usage

_c

undefined

required

_d

undefined

required

contextChangeFailed ( ctx , _10
)

Parameters

Name

Summary

Type

Usage

ctx

undefined

required

_10

undefined

required

contextUpdated ( _e , _f
)

Parameters

Name

Summary

Type

Usage

_e

undefined

required

_f

undefined

required

destroy ( preserveDom
)

Destroy this class, releasing any resources registered via own().

Parameters

Name

Summary

Type

Usage

preserveDom

Boolean

required

get ( name
)

Get a property on a Stateful instance.

Parameters

Name

Summary

Type

Usage

name

The property to get.

String

required

getCurrentContext ( )

getValue ( )

loadStatus ( )

Loads the status for the current contentLink

own ( )

Track specified handles and remove/destroy them when this instance is destroyed, unless they were
already removed/destroyed manually.

postscript ( params
)

Parameters

Name

Summary

Type

Usage

params

Object

optional

set ( name , value
)

Set a property on a Stateful instance

Parameters

Name

Summary

Type

Usage

name

The property to set.

String

required

value

The value to set in the property.

Object

required

watch ( name , callback
)

Watches a property for changes

Parameters

Name

Summary

Type

Usage

name

Indicates the property to watch. This is optional (the callback may be the
only parameter), and if omitted, all the properties will be watched

String

optional

callback

The function to execute when the property changes. This will be called after
the property has been changed. The callback will be called with the |this|
set to the instance, the first argument as the name of the property, the
second argument as the old value and the third argument as the new value.