public function getReadTemplateFile($fileName, $isUser = false)
{
if ($isUser) {
$readPaths = array($this->app['config']['user_data_realdir']);
} else {
$readPaths = array($this->app['config']['template_realdir'], $this->app['config']['template_default_realdir']);
}
foreach ($readPaths as $readPath) {
$filePath = $readPath . '/' . $fileName . '.twig';
$fs = new Filesystem();
if ($fs->exists($filePath)) {
return array('file_name' => $fileName, 'tpl_data' => file_get_contents($filePath));
}
}
}