Neos\FluidAdaptor\ViewHelpers\Format\HtmlentitiesDecodeViewHelper::render PHP Method

render() public method

Converts all HTML entities to their applicable characters as needed using PHPs html_entity_decode() function.
See also: http://www.php.net/html_entity_decode
public render ( string $value = null, boolean $keepQuotes = false, string $encoding = 'UTF-8' ) : string
$value string string to format
$keepQuotes boolean if TRUE, single and double quotes won't be replaced (sets ENT_NOQUOTES flag)
$encoding string
return string the altered string
    public function render($value = null, $keepQuotes = false, $encoding = 'UTF-8')
    {
        return self::renderStatic(array('value' => $value, 'keepQuotes' => $keepQuotes, 'encoding' => $encoding), $this->buildRenderChildrenClosure(), $this->renderingContext);
    }

Usage Example

 /**
  * @test
  */
 public function renderDoesNotModifySourceIfItIsAnObjectThatCantBeConvertedToAString()
 {
     $user = new UserWithoutToString('Xaver <b>Cross-Site</b>');
     $actualResult = $this->viewHelper->render($user);
     $this->assertSame($user, $actualResult);
 }
HtmlentitiesDecodeViewHelper