34 lines
708 B
PHP
34 lines
708 B
PHP
<?php
|
|
/**
|
|
* Define function for escaping characters.
|
|
*
|
|
* This funcion prevents of creating build-in function, which escapes also accents...
|
|
*
|
|
* @param $value
|
|
*
|
|
* @return string
|
|
*/
|
|
function e($value)
|
|
{
|
|
return htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
|
|
}
|
|
|
|
/**
|
|
* Shortcut for \App\CMS\Helpers\Settings::get()
|
|
*
|
|
* @param $key
|
|
* @param null $default
|
|
*
|
|
* @return null|string
|
|
*/
|
|
function setting($key, $default = null) {
|
|
return \App\CMS\Helpers\Settings::get($key, $default);
|
|
}
|
|
|
|
function asset_path($path) {
|
|
return env('SITE_URL').'/assets/'.$path;
|
|
}
|
|
|
|
function template_name($name, $throwExceptions = true) {
|
|
return \App\CMS\Helpers\Template::name($name, $throwExceptions);
|
|
} |