TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
CaseViewHelper Class Reference
Inheritance diagram for CaseViewHelper:
AbstractViewHelper

Public Member Functions

 initializeArguments ()
 
 render ()
 
- Public Member Functions inherited from AbstractViewHelper
 setRenderingContext (\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 prepareArguments ()
 

Static Public Member Functions

static renderStatic (array $arguments,\Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
 

Public Attributes

const CASE_LOWER = 'lower'
 
const CASE_UPPER = 'upper'
 
const CASE_CAPITAL = 'capital'
 
const CASE_UNCAPITAL = 'uncapital'
 
const CASE_CAPITAL_WORDS = 'capitalWords'
 

Protected Attributes

 $escapeChildren = false
 
- Protected Attributes inherited from AbstractViewHelper
 $controllerContext
 
 $objectManager
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractViewHelper
 callRenderMethod ()
 
 getLogger ()
 
 registerRenderMethodArguments ()
 

Detailed Description

Modifies the case of an input string to upper- or lowercase or capitalization. The default transformation will be uppercase as in mb_convert_case [1].

Possible modes are:

lower Transforms the input string to its lowercase representation

upper Transforms the input string to its uppercase representation

capital Transforms the input string to its first letter upper-cased, i.e. capitalization

uncapital Transforms the input string to its first letter lower-cased, i.e. uncapitalization

capitalWords Not supported yet: Transforms the input string to each containing word being capitalized

Note that the behavior will be the same as in the appropriate PHP function mb_convert_case [1]; especially regarding locale and multibyte behavior.

See also
http://php.net/manual/function.mb-convert-case.php [1]

= Examples =

<f:format.case>Some Text with miXed case</f:format.case> <output> SOME TEXT WITH MIXED CASE </output>

<f:format.case mode="capital">someString</f:format.case> <output> SomeString </output>

Definition at line 67 of file Format/CaseViewHelper.php.

Member Function Documentation

initializeArguments ( )

Initialize ViewHelper arguments

Returns
void

Definition at line 106 of file Format/CaseViewHelper.php.

render ( )

Changes the case of the input string

Returns
string the altered string.

Definition at line 118 of file Format/CaseViewHelper.php.

static renderStatic ( array  $arguments,
\Closure  $renderChildrenClosure,
RenderingContextInterface  $renderingContext 
)
static

Changes the case of the input string

Parameters
array$arguments
\Closure$renderChildrenClosure
RenderingContextInterface$renderingContext
Returns
string
Exceptions
InvalidVariableException

Definition at line 139 of file Format/CaseViewHelper.php.

References GeneralUtility\makeInstance().

Member Data Documentation

$escapeChildren = false
protected

Definition at line 99 of file Format/CaseViewHelper.php.

const CASE_CAPITAL = 'capital'

Directs the input string being converted to "Capital case"

Definition at line 82 of file Format/CaseViewHelper.php.

Referenced by CaseViewHelperTest\conversionTestingDataProvider().

const CASE_CAPITAL_WORDS = 'capitalWords'

Directs the input string being converted to "Capital Case For Each Word"

Definition at line 92 of file Format/CaseViewHelper.php.

const CASE_LOWER = 'lower'

Directs the input string being converted to "lowercase"

Definition at line 72 of file Format/CaseViewHelper.php.

Referenced by CaseViewHelperTest\conversionTestingDataProvider().

const CASE_UNCAPITAL = 'uncapital'

Directs the input string being converted to "unCapital case"

Definition at line 87 of file Format/CaseViewHelper.php.

Referenced by CaseViewHelperTest\conversionTestingDataProvider().

const CASE_UPPER = 'upper'

Directs the input string being converted to "UPPERCASE"

Definition at line 77 of file Format/CaseViewHelper.php.

Referenced by CaseViewHelperTest\conversionTestingDataProvider().