Backend\Modules\Locale\Engine\CacheBuilder::buildCache PHP Method

buildCache() public method

public buildCache ( string $language, string $application )
$language string
$application string Backend or Frontend
    public function buildCache($language, $application)
    {
        // get types
        $this->types = $this->database->getEnumValues('locale', 'type');
        $this->locale = $this->getLocale($language, $application);
        $this->dumpJsonCache($language, $application);
    }

Usage Example

Beispiel #1
0
 /**
  * Build the language files
  *
  * @param string $language    The language to build the locale-file for.
  * @param string $application The application to build the locale-file for.
  */
 public static function buildCache($language, $application)
 {
     $cacheBuilder = new CacheBuilder(BackendModel::get('database'));
     $cacheBuilder->buildCache($language, $application);
 }