Reputation: 351
I have installed my assets using:
php app/console assets:install web/
and the public resources have been moved to the web folder without problems.
I now want to access these assets from my php view scripts, but can only find twig examples. Can anyone show me how to accomplish this....
<link rel="stylesheet" href="{{ asset('bundles/acmedemo/css/demo.css') }}" type="text/css" media="all" />
in a php view script??
Thanks!
Upvotes: 2
Views: 2701
Reputation: 48487
href="<?php echo $view['assets']->getUrl('bundles/acmedemo/css/demo.css') ?>"
Upvotes: 3