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

  • Contacts
  • Overview
  • Package
  • Class
  • Tree

Class Contacts

This is the model class for table "x2_contacts".

CComponent
Extended by CModel implements IteratorAggregate, ArrayAccess
Extended by CActiveRecord
Extended by X2ActiveRecord
Extended by X2Model
Extended by Contacts
Package: application\modules\contacts\models
Located at x2engine/protected/modules/contacts/models/Contacts.php
Methods summary
public static Contacts
# 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

Contacts
the static model class

Overrides

X2Model::model()
public array
# relations( )

Returns

array
relational rules.

Overrides

X2Model::relations()
public string
# tableName( )

Returns

string
the associated database table name

Overrides

CActiveRecord::tableName()
public array
# behaviors( )

Returns a list of behaviors that this model should behave as.

Returns a list of behaviors that this model should behave as.

Returns

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

Overrides

X2Model::behaviors()
public array
# rules( )

Generates validation rules for custom fields

Generates validation rules for custom fields

Returns

array
validation rules for model attributes.

Overrides

X2Model::rules()
public
# duplicateFields( )

Overrides

X2Model::duplicateFields()
public
# afterFind( )

Saves attributes on initial model lookup

Saves attributes on initial model lookup

Overrides

X2Model::afterFind()
public boolean
# beforeSave( )

Returns

boolean
whether or not to save

Overrides

X2Model::beforeSave()
public
# afterUpdate( )

Responds when X2Model::afterUpdate() is called (record saved, but not a new record). Sends a notification to anyone subscribed to this contact.

Responds when X2Model::afterUpdate() is called (record saved, but not a new record). Sends a notification to anyone subscribed to this contact.

Before executing this, the model must check whether the contact has the "changelog" behavior. That is because the behavior is disabled when checking for duplicates in ContactsController

Overrides

X2Model::afterUpdate()
public static
# getNames( )
public static mixed
# getAllNames( )

Returns all public contacts.

Returns all public contacts.

Returns

mixed
$names An array of strings containing the names of contacts.
public static
# getContactLinks( mixed $contacts )
public static
# getMailingList( mixed $criteria )
public
# searchAll( mixed $pageSize = null, CDbCriteria $criteria = null )

An alias for search ()

An alias for search ()

public
# searchMyContacts( )
public
# searchNewContacts( )
public
# search( mixed $pageSize = null, CDbCriteria $criteria = null )

Adds tag filtering to search base

Adds tag filtering to search base

public
# searchAdmin( )
public
# searchAccount( mixed $id )
public
# searchList( mixed $id, mixed $pageSize = null )

Returns a DataProvider for all the contacts in the specified list, using this Contact model's attributes as a search filter

Returns a DataProvider for all the contacts in the specified list, using this Contact model's attributes as a search filter

public static String
# getNewTrackingKey( )

Generates a random tracking key and guarantees uniqueness

Generates a random tracking key and guarantees uniqueness

Returns

String
$key a unique random tracking key
Methods inherited from X2Model
__construct(), afterCreate(), afterDelete(), afterSave(), attributeChanged(), attributeLabels(), checkThrowAttrError(), compareAssignment(), compareAttribute(), compareAttributes(), compareBoolean(), compareDropdown(), findAll(), findByAttributes(), findByEmail(), findByNameId(), findByPkInArray(), getAllRecordNames(), getAssignmentOptions(), getAssociationModel(), getAssociationType(), getAssociationTypeOptions(), getAttribute(), getAttributeLabel(), getAttributeLabels(), getDefaultAssignment(), getDefaultFormLayout(), getDisplayName(), getEditableAttributeNames(), getEditableFieldNames(), getField(), getFieldComparisonOptions(), getFieldPermissions(), getFields(), getFieldsForDropdown(), getInsertableAttributeTokens(), getIsExemptFromFieldLevelPermissions(), getLinkedAttribute(), getLinkedModel(), getLinkedModelMock(), getModelLink(), getModelLinkMock(), getModelName(), getModelNames(), getModelOfTypeWithId(), getModelOfTypeWithName(), getModelTitle(), getModelTypes(), getModelTypesWhichSupportRelationships(), getModelTypesWhichSupportWorkflow(), getModelsFromNames(), getModuleModel(), getModuleModelName(), getModuleModelNames(), getModuleModelsByName(), getModuleName(), getModules(), getMyModelName(), getOldAttributes(), getPhoneNumber(), getReadableAttributeNames(), getRecordName(), getSort(), getStaticLinkedModels(), getSummaryFields(), getTableNames(), getTranslatedModelTitles(), getVisibleAttributes(), hide(), insert(), isModuleModelName(), massUpdateNameId(), model2(), modelRules(), onAfterCreate(), onAfterInsert(), onAfterUpdate(), query(), queryFields(), renderErroneousField(), renderInput(), renderLinkedAttribute(), renderMergeInput(), renderModelAutocomplete(), renderModelInput(), resetFieldsPropertyCache(), runWithoutBehavior(), save(), searchBase(), setX2Fields(), translatedAttributeLabel(), unshiftOperator(), updateNameId(), updateNameIdRefs(), updateTimerTotals()
Methods inherited from X2ActiveRecord
getAllErrorMessages(), getBehaviorRules(), getFormatter(), getInputRenderer(), getName(), renderAttribute(), setFormatter(), setInputRenderer()
Methods inherited from CActiveRecord
__call(), __get(), __isset(), __set(), __sleep(), __unset(), addRelatedRecord(), afterFindInternal(), applyScopes(), attributeNames(), beforeCount(), beforeDelete(), beforeFind(), beforeFindInternal(), cache(), count(), countByAttributes(), countBySql(), defaultScope(), delete(), deleteAll(), deleteAllByAttributes(), deleteByPk(), equals(), exists(), find(), findAllByAttributes(), findAllByPk(), findAllBySql(), findByPk(), findBySql(), getActiveFinder(), getActiveRelation(), getAttributes(), getCommandBuilder(), getDbConnection(), getDbCriteria(), getIsNewRecord(), getMetaData(), getOldPrimaryKey(), getPrimaryKey(), getRelated(), getTableAlias(), getTableSchema(), hasAttribute(), hasRelated(), init(), instantiate(), offsetExists(), onAfterDelete(), onAfterFind(), onAfterSave(), onBeforeCount(), onBeforeDelete(), onBeforeFind(), onBeforeSave(), populateRecord(), populateRecords(), primaryKey(), refresh(), refreshMetaData(), resetScope(), 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 inherited from CActiveRecord
BELONGS_TO, HAS_MANY, HAS_ONE, MANY_MANY, STAT
Properties summary
public mixed $name
#
Properties inherited from X2Model
$_editableFieldNames, $_fieldPermissions, $_fields, $_linkedModels, $_nameIdRefs, $_oldAttributes, $_runAfterCreate, $associationModels, $autoPopulateFields, $dbPersistentGridSettings, $disablePersistentGridSettings, $fieldFormatterClass, $modelNameToModuleName, $subScenario, $supportsFieldLevelPermissions, $supportsWorkflow, $translatedModelTitles, $uid
Properties inherited from X2ActiveRecord
$fieldInputRendererClass
Properties inherited from CActiveRecord
$db
Magic properties inherited from X2Model
$fieldPermissions, $isExemptFromFieldLevelPermissions, $myModelName, $readableAttributeNames, $relatedX2Models
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