API Docs for:
Show:

models.client.Base Class

Base class for client models

http://backbonejs.org/#Model

Methods

collection

(
  • [models]
  • [options]
)
models.client.Base.Collection static

Create instance of models.client.Base.Collection with this model class as the model property

Parameters:

collection

(
  • [models]
  • [options]
)
models.client.Base.Collection static

Defined in bundle.js:3754

Create instance of models.client.Base.Collection with this model class as the model property

Parameters:

collection

(
  • [models]
  • [options]
)
models.client.Base.Collection static

Create instance of models.client.Base.Collection with this model class as the model property

Parameters:

createdAt

() Date

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:12

Returns:

Date:

deletedAt

() Date

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:36

Returns:

Date:

dispose

()

Call when not using this model anymore. Unbinds all event listeners.

dispose

()

Call when not using this model anymore. Unbinds all event listeners.

dispose

()

Defined in bundle.js:3728

Call when not using this model anymore. Unbinds all event listeners.

hasVisibility

(
  • visibility
  • models
)

Visibility assertion helper

Parameters:

  • visibility String
  • models Array

    Array of models.server.Visibility models

Returns:

Boolean

isSame

(
  • other
)

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:48

Return true if the other object is built using the same constructor and they have the same id

Parameters:

Returns:

Boolean

isSoftDeleted

() Boolean

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:28

Returns:

Boolean:

rel

(
  • key
)
Object | Array

Return relation data for given key or throw if it's not loaded

Parameters:

  • key String

Returns:

Object | Array:

Relation data

rel

(
  • key
)
Object | Array

Defined in bundle.js:3682

Return relation data for given key or throw if it's not loaded

Parameters:

  • key String

Returns:

Object | Array:

Relation data

rel

(
  • key
)
Object | Array

Return relation data for given key or throw if it's not loaded

Parameters:

  • key String

Returns:

Object | Array:

Relation data

save

() Bluebird.Promise

Defined in bundle.js:3700

Save model to server http://backbonejs.org/#Model-save

Returns:

Bluebird.Promise:

with the new saved model

save

() Bluebird.Promise

Save model to server http://backbonejs.org/#Model-save

Returns:

Bluebird.Promise:

with the new saved model

save

() Bluebird.Promise

Save model to server http://backbonejs.org/#Model-save

Returns:

Bluebird.Promise:

with the new saved model

uniqueId

() String

Returns:

String:

uniqueId

() String

Returns:

String:

uniqueId

() String

Defined in bundle.js:3671

Returns:

String:

updatedAt

() Date

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:20

Returns:

Date:

wasCreatedInVicinity

() Boolean

Defined in bundle.js:3737

Return true if the another model was created within 60 seconds of this one by the same user

Returns:

Boolean:

wasCreatedInVicinity

() Boolean

Return true if the another model was created within 60 seconds of this one by the same user

Returns:

Boolean:

wasCreatedInVicinity

() Boolean

Return true if the another model was created within 60 seconds of this one by the same user

Returns:

Boolean:

Properties

idAttribute

String

Use unique_id from models.server.Base as the model id. We need this to be able to put models of diffent type to a single Backbone collection http://backbonejs.org/#Model-idAttribute

idAttribute

String

Use unique_id from models.server.Base as the model id. We need this to be able to put models of diffent type to a single Backbone collection http://backbonejs.org/#Model-idAttribute

idAttribute

String

Defined in bundle.js:3656

Use unique_id from models.server.Base as the model id. We need this to be able to put models of diffent type to a single Backbone collection http://backbonejs.org/#Model-idAttribute

saving

Bluebird.Promise | Null

Promise of the saving operation instantiated by Base#save(). Available only when the operation is ongoing.

saving

Bluebird.Promise | Null

Promise of the saving operation instantiated by Base#save(). Available only when the operation is ongoing.

saving

Bluebird.Promise | Null

Defined in bundle.js:3719

Promise of the saving operation instantiated by Base#save(). Available only when the operation is ongoing.