Created
June 7, 2015 16:47
-
-
Save BenGriffiths/2b1d66c1db427fc80757 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getAllKeyValuesForLocale($localeShortCode = '') | |
{ | |
$requestedLocale = $this->getLocale($localeShortCode); | |
$fallbackLocale = $this->getFallbackLocale(); | |
$sql = QueryFetcher::fetch('MySQL/RepositoryLocaleConfiguration/getAllKeyValuesForLocale/default'); | |
$statement = $this->executeQueryStd($sql, [ | |
'fallbackLocaleId' => $fallbackLocale['id'], | |
'localeId' => $requestedLocale['id'], | |
]); | |
return $statement->fetchAll(); | |
} | |
public function makeOtherLocalesNotFallback($exceptForLocaleId = 0, $locale = '') | |
{ | |
$result = EntLocale::where('id', '!=', $exceptForLocaleId)->update(['is_fallback_default' => 0]); | |
$this->logAdminAction('Made locale "'.$locale.'" the default fallback', $exceptForLocaleId); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment