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

  • AccountsGridViewProfileWidget
  • ActionMenu
  • ActionsGridViewProfileWidget
  • ActionsQuickCreateRelationshipBehavior
  • ActiveDateRangeInput
  • ApplicationConfigBehavior
  • Attachments
  • ChatBox
  • CommonControllerBehavior
  • ContactMapInlineTags
  • ContactsGridViewProfileWidget
  • CronForm
  • CSaveRelationsBehavior
  • DateRangeInputsWidget
  • DocsGridViewProfileWidget
  • DocViewer
  • DocViewerProfileWidget
  • EButtonColumnWithClearFilters
  • EmailDeliveryBehavior
  • EmailProgressControl
  • EncryptedFieldsBehavior
  • EventsChartProfileWidget
  • FileUploader
  • FontPickerInput
  • Formatter
  • FormView
  • GridViewWidget
  • History
  • IframeWidget
  • ImportExportBehavior
  • InlineActionForm
  • InlineEmailAction
  • InlineEmailForm
  • InlineEmailModelBehavior
  • InlineQuotes
  • JSONEmbeddedModelFieldsBehavior
  • JSONFieldsDefaultValuesBehavior
  • LeadRoutingBehavior
  • LeftWidget
  • LoginThemeHelper
  • LoginThemeHelperBase
  • MarketingGridViewProfileWidget
  • MediaBox
  • MessageBox
  • MobileFormatter
  • MobileFormLayoutRenderer
  • MobileLayoutRenderer
  • MobileLoginThemeHelper
  • MobileViewLayoutRenderer
  • ModelFileUploader
  • NewWebLeadsGridViewProfileWidget
  • NormalizedJSONFieldsBehavior
  • NoteBox
  • OnlineUsers
  • OpportunitiesGridViewProfileWidget
  • Panel
  • ProfileDashboardManager
  • ProfileGridViewWidget
  • ProfileLayoutEditor
  • ProfilesGridViewProfileWidget
  • Publisher
  • PublisherActionTab
  • PublisherCalendarEventTab
  • PublisherCallTab
  • PublisherCommentTab
  • PublisherEventTab
  • PublisherSmallCalendarEventTab
  • PublisherTab
  • PublisherTimeTab
  • QuickContact
  • QuickCreateRelationshipBehavior
  • QuotesGridViewProfileWidget
  • RecordAliasesWidget
  • RecordViewLayoutManager
  • RecordViewWidgetManager
  • RememberPagination
  • Reminders
  • ResponseBehavior
  • ResponsiveHtml
  • SearchIndexBehavior
  • ServicesGridViewProfileWidget
  • SmallCalendar
  • SmartActiveDataProvider
  • SmartDataProviderBehavior
  • SmartSort
  • SocialForm
  • SortableWidgetManager
  • SortableWidgets
  • TagBehavior
  • TagCloud
  • TemplatesGridViewProfileWidget
  • TimeZone
  • TopContacts
  • TopSites
  • TransformedFieldStorageBehavior
  • TranslationLogger
  • TwitterFeed
  • TwoColumnSortableWidgetManager
  • UpdaterBehavior
  • UpdatesForm
  • UserIdentity
  • UsersChartProfileWidget
  • WorkflowBehavior
  • X2ActiveGridView
  • X2ActiveGridViewForSortableWidgets
  • X2AssetManager
  • X2AuthManager
  • X2ChangeLogBehavior
  • X2ClientScript
  • X2Color
  • X2DateUtil
  • X2FixtureManager
  • X2FlowFormatter
  • X2GridView
  • X2GridViewBase
  • X2GridViewForSortableWidgets
  • X2GridViewSortableWidgetsBehavior
  • X2LeadsGridViewProfileWidget
  • X2LinkableBehavior
  • X2ListView
  • X2PillBox
  • X2ProgressBar
  • X2SmartSearchModelBehavior
  • X2TimestampBehavior
  • X2TranslationBehavior
  • X2UrlRule
  • X2WebModule
  • X2Widget
  • X2WidgetList
  • Overview
  • Package
  • Class
  • Tree

Class CommonControllerBehavior

A behavior for controllers; contains methods common to controllers whether or not they are children of x2base.

All controllers that use this behavior must declare the "modelClass" property.

CComponent
Extended by CBehavior implements IBehavior
Extended by CommonControllerBehavior
Package: application\components
Located at x2engine/protected/components/CommonControllerBehavior.php
Methods summary
public
# attach( CComponent $owner )

Attaches the behavior object to the component. The default implementation will set the owner property and attach event handlers as declared in CBehavior::events(). This method will also set enabled to true. Make sure you've declared handler as public and call the parent implementation if you override this method.

Attaches the behavior object to the component. The default implementation will set the owner property and attach event handlers as declared in CBehavior::events(). This method will also set enabled to true. Make sure you've declared handler as public and call the parent implementation if you override this method.

Parameters

$owner
CComponent
$owner the component that this behavior is to be attached to.

Overrides

CBehavior::attach()
public
# getModel( integer $id = null )

Returns the data model based on the primary key given.

Returns the data model based on the primary key given.

If the data model is not found, an HTTP exception will be raised.

Parameters

$id
integer
$id the ID of the model to be loaded. Note, it is assumed that when this value is null, _model is set already; otherwise there's nothing that can be done to correctly resolve the model.
public
# lookUpModel( mixed $id, mixed $modelClass )
public string
# getRealIp( )

Obtain the IP address of the current web client.

Obtain the IP address of the current web client.

Returns

string
public string
# getResolvedModelClass( )

Resolve and return the model class, if specified, or a guess.

Resolve and return the model class, if specified, or a guess.

Returns

string
public type
# loadModel( mixed $id )

Kept for backwards compatibility with controllers (including custom ones) that use loadModel.

Kept for backwards compatibility with controllers (including custom ones) that use loadModel.

Returns

type
public
# renderGaCode( type $location )

Renders Google Analytics tracking code, if enabled.

Renders Google Analytics tracking code, if enabled.

Parameters

$location
type
$location Named location in the app
public
# errorMessage( type $message, mixed $code = 500, mixed $type = "PHP Error" )

For server config or other expected errors which are not bugs but prevent the software from functioning properly.

For server config or other expected errors which are not bugs but prevent the software from functioning properly.

Parameters

$message
type
$error
$code
$type
Methods inherited from CBehavior
detach(), events(), getEnabled(), getOwner(), setEnabled()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public boolean $redirectOnNullModel true
#
public boolean $throwOnNullModel true
#
Magic properties summary
public X2Model $model
#

(read-only); in the context of viewing or updating a record, this contains the active record object corresponding to that record. Its value is set by calling CommonControllerBehavior::getModel() with the ID of the desired record.

(read-only); in the context of viewing or updating a record, this contains the active record object corresponding to that record. Its value is set by calling CommonControllerBehavior::getModel() with the ID of the desired record.

public string $resolvedModelClass
#

(read-only) The class name of the model to use for model. In some cases (i.e. some older custom modules) the class name will not be specified in the controller, and thus it is useful to guess its corresponding model's name based on its own name.

(read-only) The class name of the model to use for model. In some cases (i.e. some older custom modules) the class name will not be specified in the controller, and thus it is useful to guess its corresponding model's name based on its own name.

Magic properties inherited from CBehavior
$enabled, $owner
X2CRM Documentation API documentation generated by ApiGen 2.8.0