mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Remove reference to a method no longer used.
This commit is contained in:
@@ -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__ . '/../')
|
||||
);
|
||||
|
Reference in New Issue
Block a user