CRM_Core_I18n_Schema
class CRM_Core_I18n_Schema
Methods
Drop all views (for use by CRM_Core_DAO::dropAllTables() mostly).
Switch database from single-lang to multi (by adding the first language and dropping the original columns).
Switch database from multi-lang back to single (by dropping additional columns and views and retaining only the selected locale).
Switch a given table from multi-lang to single (by retaining only the selected locale).
Add a new locale to a multi-lang db, setting its values to the current default locale.
Rebuild multilingual indices, views and triggers (useful for upgrades)
Rewrite SQL query to use views to access tables with localized columns.
No description
No description
No description
Details
at line 38
static
dropAllViews()
Drop all views (for use by CRM_Core_DAO::dropAllTables() mostly).
at line 62
static
makeMultilingual(string $locale)
Switch database from single-lang to multi (by adding the first language and dropping the original columns).
at line 122
static
makeSinglelingual(string $retain)
Switch database from multi-lang back to single (by dropping additional columns and views and retaining only the selected locale).
at line 166
static
makeSinglelingualTable(string $retain, string $table, string $class = 'CRM_Core_I18n_SchemaStructure', array $triggers = [])
Switch a given table from multi-lang to single (by retaining only the selected locale).
at line 247
static
addLocale(string $locale, string $source)
Add a new locale to a multi-lang db, setting its values to the current default locale.
at line 306
static
rebuildMultilingualSchema(array $locales, string $version = NULL, bool $isUpgradeMode = FALSE)
Rebuild multilingual indices, views and triggers (useful for upgrades)
at line 371
static string
rewriteQuery(string $query)
Rewrite SQL query to use views to access tables with localized columns.