Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
f530ef20
Commit
f530ef20
authored
9 months ago
by
Jan-Hendrik Willms
Browse files
Options
Downloads
Patches
Plain Diff
fixes #4228
Closes #4228 Merge request
studip/studip!3059
parent
96bca3ad
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/flexi/PhpTemplate.php
+5
-10
5 additions, 10 deletions
lib/flexi/PhpTemplate.php
lib/flexi/Template.php
+1
-1
1 addition, 1 deletion
lib/flexi/Template.php
tests/unit/lib/flexi/FactoryTest.php
+1
-1
1 addition, 1 deletion
tests/unit/lib/flexi/FactoryTest.php
with
7 additions
and
12 deletions
lib/flexi/PhpTemplate.php
+
5
−
10
View file @
f530ef20
...
@@ -17,20 +17,15 @@ class PhpTemplate extends Template
...
@@ -17,20 +17,15 @@ class PhpTemplate extends Template
* @return string A string representing the rendered presentation.
* @return string A string representing the rendered presentation.
* @throws TemplateNotFoundException
* @throws TemplateNotFoundException
*/
*/
p
ublic
function
_render
():
string
p
rotected
function
_render
():
string
{
{
extract
(
$this
->
get_attributes
());
extract
(
$this
->
get_attributes
());
# include template, parse it and get output
# include template, parse it and get output
try
{
ob_start
();
ob_start
();
require
$this
->
template
;
require
$this
->
template
;
$content_for_layout
=
ob_get_contents
();
$content_for_layout
=
ob_get_contents
();
ob_end_clean
();
}
catch
(
\Error
$e
)
{
throw
new
TemplateNotFoundException
(
previous
:
$e
);
}
finally
{
ob_end_clean
();
}
# include layout, parse it and get output
# include layout, parse it and get output
if
(
isset
(
$this
->
layout
))
{
if
(
isset
(
$this
->
layout
))
{
...
...
This diff is collapsed.
Click to expand it.
lib/flexi/Template.php
+
1
−
1
View file @
f530ef20
...
@@ -18,7 +18,7 @@ abstract class Template
...
@@ -18,7 +18,7 @@ abstract class Template
*
*
* @return string A string representing the rendered presentation.
* @return string A string representing the rendered presentation.
*/
*/
abstract
p
ublic
function
_render
():
string
;
abstract
p
rotected
function
_render
():
string
;
protected
array
$attributes
=
[];
protected
array
$attributes
=
[];
protected
Template
|
null
$layout
=
null
;
protected
Template
|
null
$layout
=
null
;
...
...
This diff is collapsed.
Click to expand it.
tests/unit/lib/flexi/FactoryTest.php
+
1
−
1
View file @
f530ef20
...
@@ -108,7 +108,7 @@ final class FactoryTestCase extends \Codeception\Test\Unit
...
@@ -108,7 +108,7 @@ final class FactoryTestCase extends \Codeception\Test\Unit
public
function
testShouldRespondToAddedHandlers
()
public
function
testShouldRespondToAddedHandlers
()
{
{
$handler
=
new
class
(
''
,
$this
->
factory
)
extends
Flexi\Template
{
$handler
=
new
class
(
''
,
$this
->
factory
)
extends
Flexi\Template
{
p
ublic
function
_render
():
string
p
rotected
function
_render
():
string
{
{
return
''
;
return
''
;
}
}
...
...
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