Infohub JS API
Loading...
Searching...
No Matches
Contact Class Reference

Description

Contact information record for a user.

Inheritance diagram for Contact:
cnObject

Public Member Functions

 constructor (contact=({}))
 setFromJSON (contact=({}))
 toJSON ()
Public Member Functions inherited from cnObject
 constructor ()
get className ()
get id ()
get shortid ()
get name ()
set name (value)
 setFromJson (obj_as_json, members=null)
 getAsJson (members=null)
 dump (prefix='')
 toJSON ()
 getId ()
 getShortId ()
 getName ()
 setName (n)
 get (key, defaultValue={})
get info ()
get properties ()
 getPropertyValue (typeid, defaultValue=null)
 setPropertyValue (typeid, value)

Static Public Member Functions

static createFromJSON (contact=({}))

Static Public Attributes

static className = "Contact"

Function Documentation

◆ constructor()

constructor ( contact = ({}))

◆ createFromJSON()

createFromJSON ( contact = ({}))
static

Create a new contact from saved data.

Parameters
{Contact}[contact={}] - The contact data to create from
See also
Contact - See Contact class for all available properties
Returns
{Contact} A new Contact instance

◆ setFromJSON()

setFromJSON ( contact = ({}))

Fill an existing contact with new data.

Parameters
{Contact} [contact={}] - The contact data to update with
Returns
{void}

◆ toJSON()

toJSON ( )

Convert the contact info to a plain object.

Returns
{object} Plain object representation of the contact

Member Data Documentation

◆ className

className = "Contact"
static