Remove reference to a method no longer used.

This commit is contained in:
James Cole
2022-01-29 14:11:12 +01:00
parent acb2a8697a
commit 003d8ba02a
104 changed files with 219 additions and 256 deletions

View File

@@ -66,43 +66,6 @@ if (!function_exists('str_is_equal')) {
}
}
if (!function_exists('prefixView')) {
/**
* Get the evaluated view contents for the given view.
*
* @param string|null $view
* @param \Illuminate\Contracts\Support\Arrayable|array $data
* @param array $mergeData
*
* @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory
*/
function prefixView($view = null, $data = [], $mergeData = [])
{
$factory = app(ViewFactory::class);
if (func_num_args() === 0) {
return $factory;
}
// original view:
$prefixView = $view;
// try to find the view file first:
if(!$factory->exists($prefixView)) {
// prepend it with the view in the layout:
$layout = env('FIREFLY_III_LAYOUT', 'v1');
$prefixView = sprintf('%s.%s', $layout, $view);
// try again:
if(!$factory->exists($prefixView)) {
// if does not exist, force v1 and just continue.
$prefixView = sprintf('%s.%s', 'v1', $view);
}
}
return $factory->make($prefixView, $data, $mergeData);
}
}
$app = new Illuminate\Foundation\Application(
realpath(__DIR__ . '/../')
);