문제

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?

도움이 되었습니까?

해결책

_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'));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top