Question

I'm trying to use helpers from actions in this way:

sfContext::getInstance()->getConfiguration()->loadHelpers(array('I18N', 'Asset', 'Url'));
echo image_tag('bullet_red.png');
echo link_to('Ver detalles', 'ver-detalles/' . $record->getIdregistros(), 'class="btn btn-success btn-mini"');

But I get this error:

Fatal error: Call to undefined function _parse_attributes() in /var/www/html/monitor/lib/vendor/symfony/lib/helper/AssetHelper.php on line 333

Why?

Était-ce utile?

La solution

_parse_attributes() function is located in the Tag Helper.

so you will have to import the Tag Helper as well

sfContext::getInstance()->getConfiguration()->loadHelpers(array('I18N', 'Asset', 'Url', 'Tag'));
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top