Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
extensions.typo3.org
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
59
Issues
59
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
services
T
t3o sites
extensions.typo3.org
extensions.typo3.org
Commits
e8129407
Commit
e8129407
authored
Nov 04, 2019
by
Michal Cygankiewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove FormatViewHelper - not used and not usable in current state
parent
11349be6
Pipeline
#7784
failed with stages
in 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
56 deletions
+0
-56
extensions/ter_fe2/Classes/ViewHelpers/FormatViewHelper.php
extensions/ter_fe2/Classes/ViewHelpers/FormatViewHelper.php
+0
-56
No files found.
extensions/ter_fe2/Classes/ViewHelpers/FormatViewHelper.php
deleted
100755 → 0
View file @
11349be6
<?php
namespace
T3o\TerFe2\ViewHelpers
;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
/**
* Format view helper
*/
class
FormatViewHelper
extends
\
TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
{
/**
* Disable the escaping interceptor
*/
protected
$escapingInterceptorEnabled
=
false
;
/**
* Formats content with given function
*
* @param string $function Function to format the content
* @param mixed $content Content
* @return string Formated content
* @throws \Exception
*/
public
function
render
(
$function
,
$content
=
null
)
{
if
(
$content
===
null
)
{
$content
=
$this
->
renderChildren
();
}
if
(
empty
(
$function
)
||
!
function_exists
(
$function
))
{
throw
new
\
Exception
(
'Function "'
.
$function
.
'" not found to modify content'
);
}
if
(
!
is_string
(
$content
)
&&
!
is_array
(
$content
))
{
throw
new
\
Exception
(
'"'
.
ucfirst
(
gettype
(
$content
))
.
'" is not an allowed type in format view helper'
);
}
if
(
is_array
(
$content
))
{
return
call_user_func_array
(
$function
,
$content
);
}
return
call_user_func
(
$function
,
$content
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment