Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443205
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443205
Commits
48f5de46
Commit
48f5de46
authored
10 years ago
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2425201
by jibran, dawehner: Small cleanup follow from
#2414255
.
parent
6f814f06
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/lib/Drupal/Core/Theme/Registry.php
+6
-7
6 additions, 7 deletions
core/lib/Drupal/Core/Theme/Registry.php
core/tests/Drupal/Tests/Core/Theme/RegistryTest.php
+0
-6
0 additions, 6 deletions
core/tests/Drupal/Tests/Core/Theme/RegistryTest.php
with
6 additions
and
13 deletions
core/lib/Drupal/Core/Theme/Registry.php
+
6
−
7
View file @
48f5de46
...
...
@@ -165,7 +165,7 @@ public function __construct($root, CacheBackendInterface $cache, LockBackendInte
* services which holds the current active theme information.
*
* @param string $theme_name
* (optional) The name of the theme for which to construct the registry.
+
* (optional) The name of the theme for which to construct the registry.
*/
protected
function
init
(
$theme_name
=
NULL
)
{
if
(
$this
->
initialized
)
{
...
...
@@ -345,7 +345,7 @@ protected function build() {
/**
* Process a single implementation of hook_theme().
*
* @param $cache
* @param
array
$cache
* The theme registry that will eventually be cached; It is an associative
* array keyed by theme hooks, whose values are associative arrays
* describing the hook:
...
...
@@ -378,21 +378,20 @@ protected function build() {
* called in aforementioned order and new entries override older ones. For
* example, if a theme hook is both defined by a module and a theme, then
* the definition in the theme will be used.
* @param \stdClass $theme
* The loaded $theme object as returned from
* ThemeHandlerInterface::listInfo().
* @param string $theme
* The actual name of theme, module, etc. that is being processed.
* @param string $path
* The directory where $name is. For example, modules/system or
* themes/bartik.
*
* @see
_theme
()
* @see
\Drupal\Core\Theme\ThemeManagerInterface::render
()
* @see hook_theme()
* @see \Drupal\Core\Extension\ThemeHandler::listInfo()
* @see twig_render_template()
*
* @throws \BadFunctionCallException
*/
protected
function
processExtension
(
&
$cache
,
$name
,
$type
,
$theme
,
$path
)
{
protected
function
processExtension
(
array
&
$cache
,
$name
,
$type
,
$theme
,
$path
)
{
$result
=
array
();
$hook_defaults
=
array
(
...
...
This diff is collapsed.
Click to expand it.
core/tests/Drupal/Tests/Core/Theme/RegistryTest.php
+
0
−
6
View file @
48f5de46
...
...
@@ -7,7 +7,6 @@
namespace
Drupal\Tests\Core\Theme
;
use
Drupal\Core\Extension\Extension
;
use
Drupal\Core\Theme\ActiveTheme
;
use
Drupal\Core\Theme\Registry
;
use
Drupal\Tests\UnitTestCase
;
...
...
@@ -91,7 +90,6 @@ public function testGetRegistryForModule() {
'extension'
=>
'.twig'
,
'base_themes'
=>
[],
]));
$this
->
registry
->
setBaseThemes
(
array
());
// Include the module so that hook_theme can be called.
include_once
$this
->
root
.
'/core/modules/system/tests/modules/theme_test/theme_test.module'
;
...
...
@@ -136,10 +134,6 @@ public function setTheme(ActiveTheme $theme) {
$this
->
theme
=
$theme
;
}
public
function
setBaseThemes
(
array
$base_themes
)
{
$this
->
baseThemes
=
$base_themes
;
}
protected
function
init
(
$theme_name
=
NULL
)
{
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment