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

  • Groups
  • GroupToUser
  • Overview
  • Package
  • Class
  • Tree

Class Groups

This is the model class for table "x2_groups".

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

Groups
the static model class

Overrides

X2Model::model()
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( )

Returns

array
validation rules for model attributes.

Overrides

X2Model::rules()
public static
# getNames( )
public array
# relations( )

Returns

array
relational rules.

Overrides

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

Returns

array
customized attribute labels (name=>label)

Overrides

X2Model::attributeLabels()
public
# afterDelete( )

Delete associated group to user records

Delete associated group to user records

Overrides

X2Model::afterDelete()
public CActiveDataProvider
# search( )

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 boolean
# hasOnlineUsers( )

Returns

boolean
True if group has online users, false otherwise
public <array
# getOnlineUsers( )

Returns

<array
of objects> An array of user models where each user has an active session
public static
# inGroup( mixed $userId, mixed $groupId )

Find out if a user belongs to a group

Find out if a user belongs to a group

public static Array
# getUserGroups( integer $userId, boolean $cache = true )

Looks up groups to which the specified user belongs. Uses cache to lookup/store groups.

Looks up groups to which the specified user belongs. Uses cache to lookup/store groups.

Parameters

$userId
integer
$userId user to look up groups for
$cache
boolean
$cache whether to use cache

Returns

Array
array of groupIds
public static array
# getGroupmates( integer $userId, boolean $cache = true )

Gets a list of names of all users having a group in common with a user.

Gets a list of names of all users having a group in common with a user.

Parameters

$userId
integer
$userId User's ID
$cache
boolean
$cache Whether to cache or not

Returns

array
Methods inherited from X2Model
__construct(), afterCreate(), afterFind(), afterSave(), afterUpdate(), attributeChanged(), beforeSave(), checkThrowAttrError(), compareAssignment(), compareAttribute(), compareAttributes(), compareBoolean(), compareDropdown(), duplicateFields(), 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 true $supportsWorkflow false
#

if this model can have workflows associated with it, false otherwise

if this model can have workflows associated with it, false otherwise

Properties inherited from X2Model
$_editableFieldNames, $_fieldPermissions, $_fields, $_linkedModels, $_nameIdRefs, $_oldAttributes, $_runAfterCreate, $associationModels, $autoPopulateFields, $dbPersistentGridSettings, $disablePersistentGridSettings, $fieldFormatterClass, $modelNameToModuleName, $subScenario, $supportsFieldLevelPermissions, $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