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 AuxLib

Standalone class with miscellaneous utility functions

Located at x2engine/protected/components/util/AuxLib.php
Methods summary
public static
# getFileUploadErrorMessage( integer $errCode )

Parameters

$errCode
integer
$errCode php file upload error code
public static boolean
# checkFileUploadError( mixed $name )

Returns

boolean
True if the file upload failed with errors, false otherwise
public static
# registerTranslationsScript( string $namespace, array $messages, string $translationFile = 'app', string $scriptName = 'passMsgsToClientScript' )

Registers a script which instantiates a dictionary of translations.

Registers a script which instantiates a dictionary of translations.

Parameters

$namespace
string
$scriptName The name of the script which will be registered and which will be a property of the global JS object x2.
$messages
array
$messages An associateive array (<message label> => <untranslated message>)
$translationFile
string
$translationFile The first parameter to Yii::t
$scriptName
string
$namespace The name of the JS object which will contain the translations dictiory
public static
# registerPassVarsToClientScriptScript( string $namespace, array $vars, string $scriptName = 'passVarsToClientScript' )

Parameters

$namespace
string
$namespace The name of the JS object which will contain the translations dictionary. For nested namespaces, each namespace should be separated by a '.' character.
$vars
array
$vars An associative array ( => )
$scriptName
string
$scriptName The name of the script which will be registered and which will be a property of the global JS object x2.
public static
# printTestError( mixed $message )

Used by actions to return JSON encoded array containing error status and error message. Used for testing purposes only.

Used by actions to return JSON encoded array containing error status and error message. Used for testing purposes only.

public static
# printError( mixed $message )

Used by actions to return JSON encoded array containing error status and error message.

Used by actions to return JSON encoded array containing error status and error message.

public static
# printSuccess( mixed $message )

Used by actions to return JSON encoded array containing success status and success message.

Used by actions to return JSON encoded array containing success status and success message.

public static array
# ajaxReturn( boolean $success, string $successMessage, string $errorMessage )

Calls printError or printSuccess depending on the value of $success.

Calls printError or printSuccess depending on the value of $success.

Parameters

$success
boolean
$success
$successMessage
string
$successMessage
$errorMessage
string
$errorMessage

Returns

array
(<bool>, <string>)
public static
# debugLog( mixed $message )

Used to log debug messages

Used to log debug messages

public static
# debugLogR( mixed $arr )
public static
# debugLogHd( mixed $data )

Render a hex dump to the debug log Adapted from: https://stackoverflow.com/a/4225813

Render a hex dump to the debug log Adapted from: https://stackoverflow.com/a/4225813

public static
# logR( mixed $arr, mixed $route )

Generic version of debugLogR

Generic version of debugLogR

public static
# debugLogExport( mixed $arr )
public static
# isIE8( )
public static
# isIE( )
public static
# isAndroid( )
public static
# isIPad( )
public static
# getLayoutType( )
public static mixed
# getIEVer( )

Returns

mixed
The IE version if available, otherwise infinity
public static
# setCookie( mixed $key, mixed $val, mixed $time )
public static
# clearCookie( mixed $key )
public static array
# bindArray( array $arr, string $prefix = 'X2' )

Generates parameter binding placeholders for each element in array

Generates parameter binding placeholders for each element in array

Parameters

$arr
array
$arr parameter values to be bound in a SQL query
$prefix
string
$prefix prefix to use for paramater names

Returns

array
parameter values indexed by parameter name
public static
# arrToStrList( mixed $arr )
public static
# trace( integer $limit = null )

Prints stack trace

Prints stack trace

Parameters

$limit
integer
$limit If set, only the top $limit items on the call stack will get printed. debug_backtrace does have an optional limit argument, but it wasn't introduced until php 5.4.0.
public static array
# dropdownForJson( array $options )

Reformats and translates dropdown arrays to preserve sorting in CJSON::encode()

Reformats and translates dropdown arrays to preserve sorting in CJSON::encode()

Parameters

$options
array
an associative array of dropdown options ($value => $label)

Returns

array
a 2-D array of values and labels
public static
# println( mixed $message )
public static
# issetIsArray( mixed $param )
public static
# captureOutput( mixed $fn )
public static
# isMac( )
public static
# isAjax( )
public static
# getRequestUrl( )
X2CRM Documentation API documentation generated by ApiGen 2.8.0