0

在任何地方都没有使用示例,甚至没有关于如何使用它的说明。

4

3 回答 3

3

这是源代码,随心所欲。(IMO 似乎不太有用)。

566 /**
567  * Adds a dynamic javascript to the response object.
568  *
569  * The first argument is an internal URI.
570  * The helper automatically adds the sf_format to the internal URI, so you don't have to.
571  *
572  * @see sfResponse->addJavascript()
573  */
574 function use_dynamic_javascript($js, $position = '', $options = array())
575 {
576   $options['raw_name'] = true;
577 
578   return use_javascript(_dynamic_path($js, 'js'), $position, $options);
579 }
于 2009-06-18T03:40:54.587 回答
2

我知道这个问题有它的年龄,但我认为我们中的许多人仍然存在这个问题:)

在把我的头撞到墙上几个小时之后,我想和你分享一些信息:P

如何在 symfony 中使用 use_dynamic_javascript()助手

于 2010-01-29T15:17:51.760 回答
0

显然,这个助手添加了非静态(由你生成)JS 来响应。第一个参数是一个 url,就好像它被传递了一样url_for()

于 2010-01-29T16:51:29.717 回答