summaryrefslogtreecommitdiff
path: root/includes/sys_template.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-07-20 02:22:18 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-07-20 02:30:53 +0200
commite1762e7764d4ee4f37757ecd2630f62a440dbf0e (patch)
treeab10822d61e7a2549be99bf2e7964351ddda484b /includes/sys_template.php
parentd4ad70804be9d310787b98fcdce51b3697967d22 (diff)
replaced template_render with dynamic renderer class
Diffstat (limited to 'includes/sys_template.php')
-rw-r--r--includes/sys_template.php22
1 files changed, 0 insertions, 22 deletions
diff --git a/includes/sys_template.php b/includes/sys_template.php
index bcf462d7..a659a7f3 100644
--- a/includes/sys_template.php
+++ b/includes/sys_template.php
@@ -322,28 +322,6 @@ function table_buttons($buttons = [])
}
/**
- * Load and render template
- *
- * @param string $file
- * @param string[] $data
- * @return string
- */
-function template_render($file, $data = [])
-{
- if (file_exists($file)) {
- $template = file_get_contents($file);
- if (is_array($data)) {
- foreach ($data as $name => $content) {
- $template = str_replace('%' . $name . '%', $content, $template);
- }
- }
- return $template;
- }
- engelsystem_error('Cannot find template file &laquo;' . $file . '&raquo;.');
- return '';
-}
-
-/**
* @param string $str
* @param int $length
* @return string