Created
June 26, 2015 07:59
-
-
Save mbrodala/58878a5d757205a13d92 to your computer and use it in GitHub Desktop.
Test ViewHelper for https://review.typo3.org/40646
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\MyPackage\ViewHelpers; | |
class BoolViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper { | |
/** | |
* @param bool|NULL $foo | |
* @return string | |
*/ | |
public function render($foo = NULL) { | |
$result = 'Maybe'; | |
if ($foo === TRUE) { | |
$result = 'Yes'; | |
} | |
if ($foo === FALSE) { | |
$result = 'No'; | |
} | |
return sprintf('Do we care? %s.', $result); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment