Created
June 18, 2013 17:11
-
-
Save melz/5807332 to your computer and use it in GitHub Desktop.
Obtain the raw value from an sfOutputEscaperArrayDecorator object
This file contains hidden or 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 | |
// 1) Escaping on; View template | |
$manufacturers = $sf_user->getAttribute('manufacturer_ids', array(), 'mdUser'); | |
$user_manufacturers->getRawValue(); // returns an array() | |
// for variables in view template | |
echo $sf_data->getRaw('variable_name'); | |
// disable escaping from class method output | |
echo $object->getSomething(ESC_RAW); | |
// 2) Escaping on; Turn off in actions | |
sfConfig::set('sf_escaping_strategy', false); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment