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 Modules

This is the model class for table "x2_modules".

CComponent
Extended by CModel implements IteratorAggregate, ArrayAccess
Extended by CActiveRecord
Extended by Modules
Package: application\models
Located at x2engine/protected/models/Modules.php
Methods summary
public static
# updateTopBarLinks( array $idsOfVisibleModules, array $idsOfHiddenModules )

Update visibility and order of top bar module links

Update visibility and order of top bar module links

Parameters

$idsOfVisibleModules
array
$idsOfVisibleModules
$idsOfHiddenModules
array
$idsOfHiddenModules
public static Modules
# 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

Modules
the static model class

Overrides

CActiveRecord::model()
public static
# getModuleNames( mixed $custom = null )
public static
# getDropdownOptions( mixed $keyType = 'name', mixed $filter = null )
public static
# dropDownList( mixed $name, mixed $selected = '', mixed $htmlOptions = array () )
public string
# tableName( )

Returns

string
the associated database table name

Overrides

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

Returns the declaration of named scopes. A named scope represents a query criteria that can be chained together with other named scopes and applied to a query. This method should be overridden by child classes to declare named scopes for the particular AR classes. For example, the following code declares two named scopes: 'recently' and 'published'.

return array(
    'published'=>array(
          'condition'=>'status=1',
    ),
    'recently'=>array(
          'order'=>'create_time DESC',
          'limit'=>5,
    ),
);

If the above scopes are declared in a 'Post' model, we can perform the following queries:

$posts=Post::model()->published()->findAll();
$posts=Post::model()->published()->recently()->findAll();
$posts=Post::model()->published()->with('comments')->findAll();

Note that the last query is a relational query.

Returns the declaration of named scopes. A named scope represents a query criteria that can be chained together with other named scopes and applied to a query. This method should be overridden by child classes to declare named scopes for the particular AR classes. For example, the following code declares two named scopes: 'recently' and 'published'.

return array(
    'published'=>array(
          'condition'=>'status=1',
    ),
    'recently'=>array(
          'order'=>'create_time DESC',
          'limit'=>5,
    ),
);

If the above scopes are declared in a 'Post' model, we can perform the following queries:

$posts=Post::model()->published()->findAll();
$posts=Post::model()->published()->recently()->findAll();
$posts=Post::model()->published()->with('comments')->findAll();

Note that the last query is a relational query.

Returns

array
the scope definition. The array keys are scope names; the array values are the corresponding scope definitions. Each scope definition is represented as an array whose keys must be properties of CDbCriteria.

Overrides

CActiveRecord::scopes()
public array
# rules( )

Returns

array
validation rules for model attributes.

Overrides

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

Returns

array
relational rules.

Overrides

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

Returns

array
customized attribute labels (name=>label)

Overrides

CModel::attributeLabels()
protected
# afterDelete( )

Clean up after custom modules when they are deleted. Note, this shouldn't be applicable to default modules, they cannot be deleted, only disabled

Clean up after custom modules when they are deleted. Note, this shouldn't be applicable to default modules, they cannot be deleted, only disabled

Overrides

CActiveRecord::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 static
# getExportableModules( )

Populate a list of available modules to import/export

Populate a list of available modules to import/export

public static array
# getNamesOfModelsOfModules( )

Returns

array
names of models associated with each module
public
# getDisplayName( mixed $plural = true )
public static string|false
# displayName( boolean $plural = true, string $module = null, mixed $refresh = false )

Retrieves the title of a given module or the current module if no module is specified

Retrieves the title of a given module or the current module if no module is specified

Parameters

$plural
boolean
Retrieve the plural form of the module name
$module
string
Module to retrieve name for
$refresh

Returns

string|false
Current module title, false if none could be found
public static
# itemDisplayName( string $moduleName = null )

Retrieves the item name for the specified Module

Retrieves the item name for the specified Module

Parameters

$moduleName
string
$module Module to retrieve item name for, or the current module if null
public <array
# getCustomModules( boolean $visible = false )

Returns array of custom modules

Returns array of custom modules

Parameters

$visible
boolean
$visible

Returns

<array
of Modules>
public boolean
# retitle( string $newTitle )

Renames module

Renames module

Parameters

$newTitle
string
$newTitle

Returns

boolean
true for success, false for failure
public
# getLinkedRecord( )
public
# getTitle( )
Methods inherited from CActiveRecord
__call(), __construct(), __get(), __isset(), __set(), __sleep(), __unset(), addRelatedRecord(), afterFind(), afterFindInternal(), afterSave(), 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(), setAttribute(), setDbCriteria(), setIsNewRecord(), setOldPrimaryKey(), setPrimaryKey(), setTableAlias(), together(), update(), updateAll(), updateByPk(), updateCounters(), with()
Methods inherited from CModel
addError(), addErrors(), afterConstruct(), afterValidate(), beforeValidate(), behaviors(), 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 inherited from CActiveRecord
$db
Magic properties summary
public integer $id
#
public string $name
#
public string $title
#
public integer $visible
#
public integer $menuPosition
#
public integer $searchable
#
public integer $editable
#
public integer $adminOnly
#
public integer $custom
#
public integer $toggleable
#
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