This class will generate all the twig cache file from command line, even if LimeSurvey is not installed.
The current use case is to generate the translation files using Glot Press. In the future, it could be use to boost performance of first survey rendering (can be useful after a tmp cleanup, an update, etc).
To execute this command : php application/commands/console.php Twig generateTwigTmpFiles
It will execute all the functions
package | Default |
---|
actionGenerateAdminCache(string $sAdminDir = null)
NOTE: It's a recursive function which build every twig file in admin area.
string
the directory to parse, where to find the twig files.
actionGenerateQuestionsCache(string $sQuestionDir = null)
NOTE 1: It's a recursive function, since some directories are the question type itself (it has an answer.twig file) but other containes various question types as subdirectories. NOTE 2: Currenlty arrays are skipped. We need to set default data, so it will be done in LS4, at the same time than Question Theme Editor.
string
the directory to parse, where to find the answer.twig file.
actionGenerateQuestionThemesCache(string $themesRootDir = null)
string
the directory to parse, where to find the manifests.
actionGenerateSurveyThemesCache(string $sThemeDir = null)
string
the directory to parse, where to find the manifests.
actionGenerateTwigTmpFiles( $sThemeDir = null, $bGenerateSurveyCache = true, $bGenerateQuestionsCache = true, $bGenerateAdminCache = true, $bGenerateQuestionThemeCache = true)
actionIndex()
getQuestionThemePaths(string $questionThemeDirectory): array
string
array
init()
renderSurveyTheme( $oTemplateForPreview)
renderSurveyThemeManifest( $oTemplateForPreview)
aLogs :