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

  • ActionMetaData
  • ActionText
  • Admin
  • AmorphousModel
  • ApiHook
  • APIModel
  • ChartSetting
  • ContactForm
  • ContactList
  • Credentials
  • Criteria
  • Dropdowns
  • Events
  • EventsData
  • Fields
  • FormLayout
  • Imports
  • InlineEmail
  • LeadRouting
  • Locations
  • LoginForm
  • Maps
  • Modules
  • Notes
  • Notification
  • PhoneNumber
  • Profile
  • Record
  • Relationships
  • Roles
  • RoleToPermission
  • RoleToUser
  • RoleToWorkflow
  • Rules
  • Session
  • SessionLog
  • Social
  • Tags
  • TempFile
  • Tips
  • Tours
  • TrackEmail
  • TriggerLog
  • URL
  • ViewLog
  • Widgets
  • X2List
  • X2ListCriterion
  • X2ListItem
  • X2Model
  • Overview
  • Package
  • Class
  • Tree

Class Profile

This is the model class for table "x2_profile".

CComponent
Extended by CModel implements IteratorAggregate, ArrayAccess
Extended by CActiveRecord
Extended by X2ActiveRecord
Extended by Profile
Package: application\models
Located at x2engine/protected/models/Profile.php
Methods summary
public
# __construct( string $scenario = 'insert', mixed $uid = null, mixed $dbPersistentGridSettings = false )

Constructor.

Constructor.

Parameters

$scenario
string
$scenario scenario name. See CModel::scenario for more details about this parameter. Note: in order to setup initial model parameters use CActiveRecord::init() or CModel::afterConstruct(). Do NOT override the constructor unless it is absolutely necessary!
$uid
$dbPersistentGridSettings

Overrides

CActiveRecord::__construct()
public
# getName( )

Overrides

X2ActiveRecord::getName()
public
# setIsActive( mixed $isActive )
public
# getIsActive( )
public static Profile
# model( string $className = __CLASS__ )

Returns the static model of the specified AR class.

Returns the static model of the specified AR class.

Parameters

$className
string
$className active record class name.

Returns

Profile
the static model class

Overrides

CActiveRecord::model()
public string
# tableName( )

Returns

string
the associated database table name

Overrides

CActiveRecord::tableName()
public
# getLanguageOptions( )
public mixed
# getLanguageName( string $code, array $languageDirs )

Obtain the name of the language given its 2-5 letter code.

Obtain the name of the language given its 2-5 letter code.

If a language pack was found for the language code, return its full name. Otherwise, return false.

Parameters

$code
string
$code
$languageDirs
array
$languageDirs

Returns

mixed
public array
# behaviors( )

Returns a list of behaviors that this model should behave as. The return value should be an array of behavior configurations indexed by behavior names. Each behavior configuration can be either a string specifying the behavior class or an array of the following structure:

'behaviorName'=>array(
    'class'=>'path.to.BehaviorClass',
    'property1'=>'value1',
    'property2'=>'value2',
)

Returns a list of behaviors that this model should behave as. The return value should be an array of behavior configurations indexed by behavior names. Each behavior configuration can be either a string specifying the behavior class or an array of the following structure:

'behaviorName'=>array(
    'class'=>'path.to.BehaviorClass',
    'property1'=>'value1',
    'property2'=>'value2',
)

Note, the behavior classes must implement IBehavior or extend from CBehavior. Behaviors declared in this method will be attached to the model when it is instantiated.

For more details about behaviors, see CComponent.

Returns

array
the behavior configurations (behavior name=>behavior configuration)

Overrides

CModel::behaviors()
public
# afterSave( )

Save default layouts

Save default layouts

Overrides

CActiveRecord::afterSave()
public
# getProfileWidgetLayout( )
public
# setProfileWidgetLayout( mixed $layout )
public
# getTopicsWidgetLayout( )
public
# setTopicsWidgetLayout( mixed $layout )
public
# getRecordViewWidgetLayout( )
public
# setRecordViewWidgetLayout( mixed $layout )
public array
# rules( )

Returns

array
validation rules for model attributes.

Overrides

X2ActiveRecord::rules()
public array
# relations( )

Returns

array
relational rules.

Overrides

CActiveRecord::relations()
public array
# attributeLabels( )

Returns

array
customized attribute labels (name=>label)

Overrides

CModel::attributeLabels()
public
# getSort( )

Masks method in X2SmartSearchModelBehavior. Enables sorting by lastLogin and isActive.

Masks method in X2SmartSearchModelBehavior. Enables sorting by lastLogin and isActive.

public CActiveDataProvider
# search( mixed $resultsPerPage = null, mixed $uniqueId = null, mixed $excludeAPI = false )

Retrieves a list of models based on the current search/filter conditions.

Retrieves a list of models based on the current search/filter conditions.

Returns

CActiveDataProvider
the data provider that can return the models based on the search/filter conditions.
public static
# setMiscLayoutSetting( string $settingName, string $settingValue, mixed $suppressEcho = false )

Sets a miscLayoutSetting JSON property to the specified value

Sets a miscLayoutSetting JSON property to the specified value

Parameters

$settingName
string
$settingName The name of the JSON property
$settingValue
string
$settingValue The value that the JSON property will bet set to
$suppressEcho
public static
# setDetailView( mixed $value )
public static
# getDetailView( )
public
# getSignature( mixed $html = false )
public static
# getResultsPerPage( )
public static
# getPossibleResultsPerPage( )
public static
# getGridviewSettings( mixed $gvSettingsName = null )
public static
# setGridviewSettings( mixed $gvSettings, mixed $gvSettingsName = null )
public static
# getFormSettings( mixed $formName = null )
public static
# setFormSettings( mixed $formSettings, mixed $formName = null )
public static
# getWidgets( )
public static
# getWidgetSettings( )
public static Array
# getDefaultWidgetSettings( )

get an array of default widget values

get an array of default widget values

Returns

Array
of default values for widgets
public static boolean
# changeWidgetSetting( string $widget, string $setting, variable $value )

Method to change a specific value in a widgets settings

Method to change a specific value in a widgets settings

Parameters

$widget
string
$widget Name of widget
$setting
string
$setting Name of setting within the widget
$value
variable
$value to insert into the setting

Returns

boolean
false if profile did not exist
public static Object
# getWidgetSetting( string $widget, string $setting = null )

Safely retrieves the settings of a widget, and pulls from the default if the setting does not exist

Safely retrieves the settings of a widget, and pulls from the default if the setting does not exist

Parameters

$widget
string
$widget The settings to return.
$setting
string
$setting Optional.

Returns

Object
widget settings object
String
widget settings string (if $setting is set)
public
# getLink( )
public
# syncActionToGoogleCalendar( mixed $action, mixed $ajax = false )
public
# updateGoogleCalendarEvent( mixed $action )
public
# deleteGoogleCalendarEvent( mixed $action )
public array
# initLayout( )

Initializes widget layout. The layout is a set of associative arrays with the following format: array ( 'left'=> array()
'content' => array(
'widget1'=> array(
'name' => 'widget name',
)
) 'right' => array() )

Initializes widget layout. The layout is a set of associative arrays with the following format: array ( 'left'=> array() 'content' => array( 'widget1'=> array( 'name' => 'widget name', ) ) 'right' => array() )

The layout should be json encoded and saved in profile layout property.

Returns

array
public array
# getLayout( )

Returns the layout for the user's widgets as an associative array.

Returns the layout for the user's widgets as an associative array.

Returns

array
public
# getHiddenProfileWidgetMenu( )
public
# getWidgetMenu( )

Returns an html list of hidden widgets used in the Widget Menu

Returns an html list of hidden widgets used in the Widget Menu

public
# saveLayout( array $layout )

Saves a layout to the user's profile as a json string

Saves a layout to the user's profile as a json string

Parameters

$layout
array
$layout
public static
# renderFullSizeAvatar( integer $id, mixed $dimensionLimit = 95 )

Renders the avatar image with max dimension 95x95

Renders the avatar image with max dimension 95x95

Parameters

$id
integer
$id the profile id
$dimensionLimit
public static
# renderEditableAvatar( integer $id )

Renders the avatar image with max dimension 95x95

Renders the avatar image with max dimension 95x95

Parameters

$id
integer
$id the profile id
public static
# renderAvatarImage( mixed $id, mixed $width, mixed $height, array $htmlOptions = array () )
public
# getLastLogin( )
public
# getTheme( )

Return theme after checking for an enforced default

Return theme after checking for an enforced default

public
# setLoginSound( mixed $soundId )
public
# setNotificationSound( mixed $soundId )
public mixed
# getDefaultEmailTemplate( string $moduleName )

Get the default email template for the specified module

Get the default email template for the specified module

Parameters

$moduleName
string
$moduleName

Returns

mixed
null if the module has no default template, the id of the default template otherwise
public array
# getUsernamesOfAvailableUsers( )

Returns

array
usernames of users available to receive leads
public Profile
# getGuestProfile( )

Returns

Profile
public
# getWidgetLayout( mixed $name )
Methods inherited from X2ActiveRecord
getAllErrorMessages(), getBehaviorRules(), getFormatter(), getInputRenderer(), renderAttribute(), setFormatter(), setInputRenderer()
Methods inherited from CActiveRecord
__call(), __get(), __isset(), __set(), __sleep(), __unset(), addRelatedRecord(), afterDelete(), afterFind(), afterFindInternal(), applyScopes(), attributeNames(), beforeCount(), beforeDelete(), beforeFind(), beforeFindInternal(), beforeSave(), cache(), count(), countByAttributes(), countBySql(), defaultScope(), delete(), deleteAll(), deleteAllByAttributes(), deleteByPk(), equals(), exists(), find(), findAll(), findAllByAttributes(), findAllByPk(), findAllBySql(), findByAttributes(), findByPk(), findBySql(), getActiveFinder(), getActiveRelation(), getAttribute(), getAttributeLabel(), getAttributes(), getCommandBuilder(), getDbConnection(), getDbCriteria(), getIsNewRecord(), getMetaData(), getOldPrimaryKey(), getPrimaryKey(), getRelated(), getTableAlias(), getTableSchema(), hasAttribute(), hasRelated(), init(), insert(), instantiate(), offsetExists(), onAfterDelete(), onAfterFind(), onAfterSave(), onBeforeCount(), onBeforeDelete(), onBeforeFind(), onBeforeSave(), populateRecord(), populateRecords(), primaryKey(), query(), refresh(), refreshMetaData(), resetScope(), save(), saveAttributes(), saveCounters(), scopes(), setAttribute(), setDbCriteria(), setIsNewRecord(), setOldPrimaryKey(), setPrimaryKey(), setTableAlias(), together(), update(), updateAll(), updateByPk(), updateCounters(), with()
Methods inherited from CModel
addError(), addErrors(), afterConstruct(), afterValidate(), beforeValidate(), clearErrors(), createValidators(), generateAttributeLabel(), getError(), getErrors(), getIterator(), getSafeAttributeNames(), getScenario(), getValidatorList(), getValidators(), hasErrors(), isAttributeRequired(), isAttributeSafe(), offsetGet(), offsetSet(), offsetUnset(), onAfterConstruct(), onAfterValidate(), onBeforeValidate(), onUnsafeAttribute(), setAttributes(), setScenario(), unsetAttributes(), validate()
Methods inherited from CComponent
asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Constants summary
string GUEST_PROFILE_USERNAME '__x2_guest_profile__'
#

username of guest profile record

username of guest profile record

Constants inherited from CActiveRecord
BELONGS_TO, HAS_MANY, HAS_ONE, MANY_MANY, STAT
Properties summary
public mixed $photo
#
public string $uid
#

Used in the search scenario to uniquely identify this model. Allows filters
to be saved for each grid view.

Used in the search scenario to uniquely identify this model. Allows filters to be saved for each grid view.

public boolean $dbPersistentGridSettings false
#

If true, grid views displaying models of this type will have their filter and
sort settings saved in the database instead of in the session

If true, grid views displaying models of this type will have their filter and sort settings saved in the database instead of in the session

Properties inherited from X2ActiveRecord
$fieldFormatterClass, $fieldInputRendererClass
Properties inherited from CActiveRecord
$db
Magic properties inherited from CActiveRecord
$attributes, $commandBuilder, $dbConnection, $dbCriteria, $isNewRecord, $metaData, $oldPrimaryKey, $primaryKey, $tableAlias, $tableSchema
Magic properties inherited from CModel
$errors, $iterator, $safeAttributeNames, $scenario, $validatorList, $validators
X2CRM Documentation API documentation generated by ApiGen 2.8.0