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

  • ActionFormModel
  • ArrayUtil
  • ArrayValidator
  • AssociatedMediaBehavior
  • AuxLib
  • Changelog
  • DetailView
  • EncryptUtilTmp
  • EventsWidgetFieldFormatter
  • FailedLogins
  • FieldFormatter
  • FieldFormatterBase
  • FieldInputRenderer
  • FileFieldBehavior
  • FiltersForm
  • FilterUtil
  • FineDiff
  • FineDiffCopyOp
  • FineDiffDeleteOp
  • FineDiffInsertOp
  • FineDiffOp
  • FineDiffOps
  • FineDiffReplaceOp
  • GlobalCSSFormModel
  • GlobalImportFormModel
  • GoogleAuthenticator
  • JSONFieldsBehavior
  • JSONResponse
  • MediaFieldFormatter
  • MediaSelector
  • MobileActiveRecordFieldFormatter
  • MobileActivityFeed
  • MobileChartDashboard
  • MobileFieldFormatter
  • MobileFieldInputRenderer
  • ModuleModelNameValidator
  • MultiChildNode
  • MultiTypeAutocomplete
  • PasswordUtil
  • ProductFeature
  • ProfileWidgetLayout
  • QueryParamGenerator
  • RecordLimitBehavior
  • RecordView
  • RecordViewWidgetLayout
  • RelationshipsGridModel
  • RelationshipsJoin
  • RepairUserDataCommand
  • RequestUtil
  • RequiredIfNotSetValidator
  • ResponseUtil
  • RunMigrationScriptCommand
  • ServiceWebFormDesigner
  • Settings
  • StringUtil
  • TestEmailAction
  • TestEmailActionForm
  • ThemeGenerator
  • TimerUtil
  • TopicsFieldFormatter
  • TopicsWidgetLayout
  • TransactionalViewFieldFormatter
  • UrlUtil
  • ValidLinkValidator
  • WebFormDesigner
  • WebLeadFormDesigner
  • X2ActiveRecordBehavior
  • X2ActiveRecordFieldFormatter
  • X2ButtonColumn
  • X2ConditionList
  • X2ConsoleCommand
  • X2ControllerBehavior
  • X2DataColumn
  • X2DuplicateBehavior
  • X2Flashes
  • X2GridViewFieldFormatter
  • X2IPAddress
  • X2LeadsDataColumn
  • X2MergeableBehavior
  • X2MessageSource
  • X2MobileControllerBehavior
  • X2MobileProfileControllerBehavior
  • X2MobileQuotesControllerBehavior
  • X2MobileSiteControllerBehavior
  • X2MobileTopicsControllerBehavior
  • X2ModelConversionBehavior
  • X2ModelConversionWidget
  • X2ModelForeignKeyValidator
  • X2ModelUniqueIndexValidator
  • X2NonWebUser
  • X2StaticDropdown
  • X2StaticField
  • X2StaticFieldsBehavior
  • X2UrlManager
  • X2Validator
  • X2WidgetBehavior

Interfaces

  • AdminOwnedCredentials

Exceptions

  • CampaignMailingException
  • CodeExchangeException
  • GetCredentialsException
  • NoRefreshTokenException
  • NoUserIdException
  • StringUtilException

Functions

  • checkCurrency
  • checkDNS
  • checkServerVar
  • checkTimezone
  • decodeQuotes
  • echoIcons
  • encodeQuotes
  • exceptionForError
  • getField
  • getLanguageName
  • getModuleTitle
  • handleReqError
  • handleReqException
  • installer_t
  • installer_tr
  • isAllowedDir
  • mediaMigrationRrmdir
  • migrateMediaDir
  • printGraph
  • printR
  • renderFields
  • reqShutdown
  • RIP
  • translateOptions
  • tryGetRemote
  • Overview
  • Package
  • Class
  • Tree

Class X2MessageSource

This is a modified version of the default Yii class. The only change that has been made is the inclusion of "common.php" as a shared source of translation messages. Ctrl + F for "X2CHANGE" to find the exact location of this customization.

CComponent
Extended by CApplicationComponent implements IApplicationComponent
Extended by CMessageSource
Extended by X2MessageSource
Located at x2engine/protected/components/X2MessageSource.php
Methods summary
public
# init( )

Initializes the application component. This method overrides the parent implementation by preprocessing the user request data.

Initializes the application component. This method overrides the parent implementation by preprocessing the user request data.

Overrides

CApplicationComponent::init()
protected string
# translateMessage( string $category, string $message, string $language )

Translates the specified message. If the message is not found, an CMessageSource::onMissingTranslation() event will be raised.

Translates the specified message. If the message is not found, an CMessageSource::onMissingTranslation() event will be raised.

Parameters

$category
string
$category the category that the message belongs to
$message
string
$message the message to be translated
$language
string
$language the target language

Returns

string
the translated message

Overrides

CMessageSource::translateMessage()
protected string
# getMessageFile( string $category, string $language )

Determines the message file name based on the given category and language. If the category name contains a dot, it will be split into the module class name and the category name. In this case, the message file will be assumed to be located within the 'messages' subdirectory of the directory containing the module class file. Otherwise, the message file is assumed to be under the X2MessageSource::$basePath.

Determines the message file name based on the given category and language. If the category name contains a dot, it will be split into the module class name and the category name. In this case, the message file will be assumed to be located within the 'messages' subdirectory of the directory containing the module class file. Otherwise, the message file is assumed to be under the X2MessageSource::$basePath.

Parameters

$category
string
$category category name
$language
string
$language language ID

Returns

string
the message file path
protected array
# loadMessages( string $category, string $language )

Loads the message translation for the specified language and category.

Loads the message translation for the specified language and category.

Parameters

$category
string
$category the message category
$language
string
$language the target language

Returns

array
the loaded messages
Methods inherited from CMessageSource
getLanguage(), onMissingTranslation(), setLanguage(), translate()
Methods inherited from CApplicationComponent
getIsInitialized()
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()
Constants summary
string CACHE_KEY_PREFIX 'Yii.CPhpMessageSource.'
#
Properties summary
public integer $cachingDuration 0
#

the time in seconds that the messages can remain valid in cache. Defaults to 0, meaning the caching is disabled.

the time in seconds that the messages can remain valid in cache. Defaults to 0, meaning the caching is disabled.

public string $cacheID 'cache'
#

the ID of the cache application component that is used to cache the messages. Defaults to 'cache' which refers to the primary cache application component. Set this property to false if you want to disable caching the messages.

the ID of the cache application component that is used to cache the messages. Defaults to 'cache' which refers to the primary cache application component. Set this property to false if you want to disable caching the messages.

public string $basePath
#

the base path for all translated messages. Defaults to null, meaning the "messages" subdirectory of the application directory (e.g. "protected/messages").

the base path for all translated messages. Defaults to null, meaning the "messages" subdirectory of the application directory (e.g. "protected/messages").

public array $extensionPaths array()
#

the message paths for extensions that do not have a base class to use as category prefix. The format of the array should be:

array(
    'ExtensionName' => 'ext.ExtensionName.messages',
)

Where the key is the name of the extension and the value is the alias to the path of the "messages" subdirectory of the extension. When using Yii::t() to translate an extension message, the category name should be set as 'ExtensionName.categoryName'. Defaults to an empty array, meaning no extensions registered.

the message paths for extensions that do not have a base class to use as category prefix. The format of the array should be:

array(
    'ExtensionName' => 'ext.ExtensionName.messages',
)

Where the key is the name of the extension and the value is the alias to the path of the "messages" subdirectory of the extension. When using Yii::t() to translate an extension message, the category name should be set as 'ExtensionName.categoryName'. Defaults to an empty array, meaning no extensions registered.

Since

1.1.13
public boolean $logBlankMessages true
#

Whether or not to log a missing translation if the index is found in the messages file, but the translation message is blank. For example, 'X2Engine'=>'' would trigger an onMissingTranslation event if this parameter is set to true, but will not trigger if it is set to false.

Whether or not to log a missing translation if the index is found in the messages file, but the translation message is blank. For example, 'X2Engine'=>'' would trigger an onMissingTranslation event if this parameter is set to true, but will not trigger if it is set to false.

Properties inherited from CMessageSource
$forceTranslation
Properties inherited from CApplicationComponent
$behaviors
Magic properties inherited from CMessageSource
$language
Magic properties inherited from CApplicationComponent
$isInitialized
X2CRM Documentation API documentation generated by ApiGen 2.8.0