From aa9abd236239e363da2934918fe1fb32242a1859 Mon Sep 17 00:00:00 2001 From: nashe Date: Tue, 17 Oct 2017 09:13:29 +0200 Subject: Add view_path and admin_path helpers --- app/helpers.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/app/helpers.php b/app/helpers.php index 6ec55c1..56d8eba 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -11,6 +11,28 @@ function custom_path($file = '') return __DIR__.'/../custom' . (!empty($file) ? '/'.$file : ''); } +/** + * Path to the _views_ directory. + * + * @param string $file Append this filename to the returned path. + * @return string + */ +function views_path($file = '') +{ + return custom_path('views/install.tpl.php'); +} + +/** + * Path to the _admin_ directory. + * + * @param string $file Append this filename to the returned path. + * @return string + */ +function admin_path($file = '') +{ + return __DIR__.'/../admin' . (!empty($file) ? '/'.$file : ''); +} + /** * Is moonmoon installed? * -- cgit v1.2.1