Rename DI::apphelper() to DI::appHeler()

This commit is contained in:
Art4 2024-11-17 20:00:34 +00:00
parent e320b010c7
commit 603af2fb19
31 changed files with 44 additions and 44 deletions

View file

@ -80,7 +80,7 @@ class Hook
*/
public static function register(string $hook, string $file, string $function, int $priority = 0)
{
$file = str_replace(DI::apphelper()->getBasePath() . DIRECTORY_SEPARATOR, '', $file);
$file = str_replace(DI::appHelper()->getBasePath() . DIRECTORY_SEPARATOR, '', $file);
$condition = ['hook' => $hook, 'file' => $file, 'function' => $function];
if (DBA::exists('hook', $condition)) {
@ -101,7 +101,7 @@ class Hook
*/
public static function unregister(string $hook, string $file, string $function): bool
{
$relative_file = str_replace(DI::apphelper()->getBasePath() . DIRECTORY_SEPARATOR, '', $file);
$relative_file = str_replace(DI::appHelper()->getBasePath() . DIRECTORY_SEPARATOR, '', $file);
// This here is only needed for fixing a problem that existed on the develop branch
$condition = ['hook' => $hook, 'file' => $file, 'function' => $function];
@ -197,7 +197,7 @@ class Hook
public static function callSingle(string $name, array $hook, &$data = null)
{
// Don't run a theme's hook if the user isn't using the theme
if (strpos($hook[0], 'view/theme/') !== false && strpos($hook[0], 'view/theme/' . DI::apphelper()->getCurrentTheme()) === false) {
if (strpos($hook[0], 'view/theme/') !== false && strpos($hook[0], 'view/theme/' . DI::appHelper()->getCurrentTheme()) === false) {
return;
}