Skip to content

Instantly share code, notes, and snippets.

@melz
Created June 18, 2013 17:11
Show Gist options
  • Save melz/5807332 to your computer and use it in GitHub Desktop.
Save melz/5807332 to your computer and use it in GitHub Desktop.
Obtain the raw value from an sfOutputEscaperArrayDecorator object
<?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