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 ThemeGenerator

Class to generate a CSS files from profile settings, works as a templating system. Templates files are .php files that return a string of css. The array $colors will be sent to the files with generated keys based on $settingsList.

For example, because 'text' is a key in $settingsList, $colors[text] $colors[dark_text] $colors[darker_text] $colors[bright_text] $colors[brighter_text] $colors[light_text] $colors[lighter_text] $colors[opaque_text]

Are all avaliable to the templates. light and lighter keys are 'smart' meaning it will appear brighter on dark themes and darker on dark themes.
In addition, the keys
$colors[smart_text] $colors[smart_text2]
will adapt based on the difference in contrast between highlight1 and highlight2 with text respectively

An entry in the color array automatically adds the !important tag and a semicolon. Example Template entry:
#content a:hover { color: $colors[darker_link] }
#content span { background: $colors[highlight2] color: $colors[smart_text2] }

To use key that doesnt have the !important tag added, append _hex to the key $colors[text_hex], $colors[darker_hex]

See: ThemeBuildCommand for how to build themes out of theme tags.
Located at x2engine/protected/components/ThemeGenerator/ThemeGenerator.php
Methods summary
public static
# getSettingsList( )
public static
# clearCache( )
public static array
# generatePalette( mixed $preferences, mixed $refresh = false )

Populates the array with different color option

Populates the array with different color option

Returns

array
array filled with formatted css color strings
public static array
# formatColorArray( array $colors )

Formats a color array to be CSS-ready by adding important tags and adding a key appended with hex that does not have the important tags

Formats a color array to be CSS-ready by adding important tags and adding a key appended with hex that does not have the important tags

Parameters

$colors
array
Array of color keys

Returns

array
Array of formatted array
public static
# render( )

Computes the theme and registers it with Yii

Computes the theme and registers it with Yii

public static
# loadDefault( string $themeName, boolean $computed = true )

Loads a theme for the login page

Loads a theme for the login page

Parameters

$themeName
string
$themeName string of the theme to render
$computed
boolean
$computed whether or not to include computed theme color values
public static
# renderTheme( mixed $themeName = null )

Wrapper function for render and default render

Wrapper function for render and default render

public static
# renderThemeColorSelector( mixed $label, mixed $key, mixed $value, mixed $htmlOptions = array (), mixed $disabled = false )
public static
# renderSettings( )

Renders the settings for the profile page based on the $settingsList array TODO: Move to a class for rendering the theme settings.

Renders the settings for the profile page based on the $settingsList array TODO: Move to a class for rendering the theme settings.

public static
# getTranslations( )

Retrieves translated labels of field names

Retrieves translated labels of field names

public static
# removeBackdrop( )

Function to remove the color from the #content element of a page.

Function to remove the color from the #content element of a page.

public static
# isThemed( )
public static
# getProfileKeys( mixed $internal = true, mixed $base = true, mixed $computed = true )
Constants summary
string TEMPLATE_PATH 'components/ThemeGenerator/templates'
#

Path to the folder of templates.

Path to the folder of templates.

Properties summary
public static name $defaultLight 'Default'
#

of default light theme

of default light theme

public static name $defaultDark 'Terminal'
#

of default dark theme

of default dark theme

X2CRM Documentation API documentation generated by ApiGen 2.8.0