Loading core/lib/Drupal/Core/Theme/Registry.php +7 −7 Original line number Diff line number Diff line Loading @@ -411,7 +411,7 @@ public function getBaseHook($hook) { */ protected function build() { $cache = [ static::PREPROCESS_INVOKES => [], self::PREPROCESS_INVOKES => [], ]; $fixed_preprocess_functions = $this->collectModulePreprocess($cache, 'preprocess'); // First, preprocess the theme hooks advertised by modules. This will Loading Loading @@ -674,7 +674,7 @@ protected function processExtension(array &$cache, $name, $type, $theme, $path) // template. if ($type == 'theme' || $type == 'base_theme') { foreach ($cache as $hook => $info) { if ($hook == static::PREPROCESS_INVOKES) { if ($hook == self::PREPROCESS_INVOKES) { continue; } // Check only if not registered by the theme or engine. Loading Loading @@ -826,7 +826,7 @@ protected function postProcessExtension(array &$cache, ActiveTheme $theme) { // Add missing preprocessor to existing hook. $cache[$hook]['preprocess functions'][] = $preprocessor; if (isset($invokes[$preprocessor])) { $cache[static::PREPROCESS_INVOKES][$preprocessor] = $invokes[$preprocessor]; $cache[self::PREPROCESS_INVOKES][$preprocessor] = $invokes[$preprocessor]; } } elseif (!isset($cache[$hook]) && strpos($hook, '__')) { Loading @@ -836,7 +836,7 @@ protected function postProcessExtension(array &$cache, ActiveTheme $theme) { $this->completeSuggestion($hook, $cache); $cache[$hook]['preprocess functions'][] = $preprocessor; if (isset($invokes[$preprocessor])) { $cache[static::PREPROCESS_INVOKES][$preprocessor] = $invokes[$preprocessor]; $cache[self::PREPROCESS_INVOKES][$preprocessor] = $invokes[$preprocessor]; } } } Loading @@ -845,7 +845,7 @@ protected function postProcessExtension(array &$cache, ActiveTheme $theme) { // hooks. This ensures that derivative hooks have a complete set of variable // preprocess functions. foreach ($cache as $hook => $info) { if ($hook == static::PREPROCESS_INVOKES) { if ($hook == self::PREPROCESS_INVOKES) { continue; } // The 'base hook' is only applied to derivative hooks already registered Loading Loading @@ -953,7 +953,7 @@ public function getPrefixGroupedUserFunctions($prefixes = []) { */ protected function addFixedPreprocessFunctions(array &$cache, array $fixed_preprocess_functions, array $old_cache = []): void { foreach (array_keys(array_diff_key($cache, $old_cache)) as $hook) { if ($hook == static::PREPROCESS_INVOKES) { if ($hook == self::PREPROCESS_INVOKES) { continue; } if (!isset($cache[$hook]['preprocess functions'])) { Loading Loading @@ -990,7 +990,7 @@ protected function collectModulePreprocess(array &$cache, string $hook): array { // implementations are not executed. $this->moduleHandler->invokeAllWith($hook, function (callable $callable, string $module) use ($hook, &$cache, &$preprocess_functions) { $function = $module . '_' . $hook; $cache[static::PREPROCESS_INVOKES][$function] = ['module' => $module, 'hook' => $hook]; $cache[self::PREPROCESS_INVOKES][$function] = ['module' => $module, 'hook' => $hook]; $preprocess_functions[] = $function; }); return $preprocess_functions; Loading core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ class RowCountExceptionTest extends UnitTestCase { */ public static function providerTestExceptionMessage() { return [ [static::DEFAULT_EXCEPTION_MESSAGE, ''], [self::DEFAULT_EXCEPTION_MESSAGE, ''], ['test', 'test'], ]; } Loading @@ -47,7 +47,7 @@ public function testExceptionMessage($expected, $message): void { */ public function testExceptionMessageNull(): void { $e = new RowCountException(NULL); $this->assertSame(static::DEFAULT_EXCEPTION_MESSAGE, $e->getMessage()); $this->assertSame(self::DEFAULT_EXCEPTION_MESSAGE, $e->getMessage()); } } Loading
core/lib/Drupal/Core/Theme/Registry.php +7 −7 Original line number Diff line number Diff line Loading @@ -411,7 +411,7 @@ public function getBaseHook($hook) { */ protected function build() { $cache = [ static::PREPROCESS_INVOKES => [], self::PREPROCESS_INVOKES => [], ]; $fixed_preprocess_functions = $this->collectModulePreprocess($cache, 'preprocess'); // First, preprocess the theme hooks advertised by modules. This will Loading Loading @@ -674,7 +674,7 @@ protected function processExtension(array &$cache, $name, $type, $theme, $path) // template. if ($type == 'theme' || $type == 'base_theme') { foreach ($cache as $hook => $info) { if ($hook == static::PREPROCESS_INVOKES) { if ($hook == self::PREPROCESS_INVOKES) { continue; } // Check only if not registered by the theme or engine. Loading Loading @@ -826,7 +826,7 @@ protected function postProcessExtension(array &$cache, ActiveTheme $theme) { // Add missing preprocessor to existing hook. $cache[$hook]['preprocess functions'][] = $preprocessor; if (isset($invokes[$preprocessor])) { $cache[static::PREPROCESS_INVOKES][$preprocessor] = $invokes[$preprocessor]; $cache[self::PREPROCESS_INVOKES][$preprocessor] = $invokes[$preprocessor]; } } elseif (!isset($cache[$hook]) && strpos($hook, '__')) { Loading @@ -836,7 +836,7 @@ protected function postProcessExtension(array &$cache, ActiveTheme $theme) { $this->completeSuggestion($hook, $cache); $cache[$hook]['preprocess functions'][] = $preprocessor; if (isset($invokes[$preprocessor])) { $cache[static::PREPROCESS_INVOKES][$preprocessor] = $invokes[$preprocessor]; $cache[self::PREPROCESS_INVOKES][$preprocessor] = $invokes[$preprocessor]; } } } Loading @@ -845,7 +845,7 @@ protected function postProcessExtension(array &$cache, ActiveTheme $theme) { // hooks. This ensures that derivative hooks have a complete set of variable // preprocess functions. foreach ($cache as $hook => $info) { if ($hook == static::PREPROCESS_INVOKES) { if ($hook == self::PREPROCESS_INVOKES) { continue; } // The 'base hook' is only applied to derivative hooks already registered Loading Loading @@ -953,7 +953,7 @@ public function getPrefixGroupedUserFunctions($prefixes = []) { */ protected function addFixedPreprocessFunctions(array &$cache, array $fixed_preprocess_functions, array $old_cache = []): void { foreach (array_keys(array_diff_key($cache, $old_cache)) as $hook) { if ($hook == static::PREPROCESS_INVOKES) { if ($hook == self::PREPROCESS_INVOKES) { continue; } if (!isset($cache[$hook]['preprocess functions'])) { Loading Loading @@ -990,7 +990,7 @@ protected function collectModulePreprocess(array &$cache, string $hook): array { // implementations are not executed. $this->moduleHandler->invokeAllWith($hook, function (callable $callable, string $module) use ($hook, &$cache, &$preprocess_functions) { $function = $module . '_' . $hook; $cache[static::PREPROCESS_INVOKES][$function] = ['module' => $module, 'hook' => $hook]; $cache[self::PREPROCESS_INVOKES][$function] = ['module' => $module, 'hook' => $hook]; $preprocess_functions[] = $function; }); return $preprocess_functions; Loading
core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ class RowCountExceptionTest extends UnitTestCase { */ public static function providerTestExceptionMessage() { return [ [static::DEFAULT_EXCEPTION_MESSAGE, ''], [self::DEFAULT_EXCEPTION_MESSAGE, ''], ['test', 'test'], ]; } Loading @@ -47,7 +47,7 @@ public function testExceptionMessage($expected, $message): void { */ public function testExceptionMessageNull(): void { $e = new RowCountException(NULL); $this->assertSame(static::DEFAULT_EXCEPTION_MESSAGE, $e->getMessage()); $this->assertSame(self::DEFAULT_EXCEPTION_MESSAGE, $e->getMessage()); } }