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
5adf95a9
Commit
5adf95a9
authored
9 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2563821
by dawehner: Implement Twig_Loader_String for ourselves
parent
570fba20
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/lib/Drupal/Core/Template/Loader/StringLoader.php
+22
-1
22 additions, 1 deletion
core/lib/Drupal/Core/Template/Loader/StringLoader.php
with
22 additions
and
1 deletion
core/lib/Drupal/Core/Template/Loader/StringLoader.php
+
22
−
1
View file @
5adf95a9
...
...
@@ -25,7 +25,7 @@
* @see \Drupal\Core\Render\Element\InlineTemplate
* @see twig_render_template()
*/
class
StringLoader
ext
en
d
s
\Twig_Loader
_String
{
class
StringLoader
implem
en
t
s
\Twig_Loader
Interface
,
\Twig_ExistsLoaderInterface
{
/**
* {@inheritdoc}
...
...
@@ -39,4 +39,25 @@ public function exists($name) {
}
}
/**
* {@inheritdoc}
*/
public
function
getSource
(
$name
)
{
return
$name
;
}
/**
* {@inheritdoc}
*/
public
function
getCacheKey
(
$name
)
{
return
$name
;
}
/**
* {@inheritdoc}
*/
public
function
isFresh
(
$name
,
$time
)
{
return
true
;
}
}
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