我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

symfony:如何通过_partial执行操作

in my application, I have a menu which is a partial (_menu.php)

I need in my menu which is on the entire application, to have access to that :

$this->user = $this->getUser()->getGuardUser();
$this->unread = Doctrine::getTable('sfSocialMessageRcpt')->countUnreadMessages($this->user);

But how to create an action for my partial which is rendered in the entire application ?

Thanks

ok, i used components instead. it fixed my problem

近期文章

  • PHP Web设计:使用Smarty vs Rest使用jQuery
  • 对于从日期到B日期的搜索数据,请使用WHERE CLAUSE
  • Plupload上传文件名问题
  • 你知道PHP的任何流行的PHP模板引擎有当前上下文节点的概念吗?
  • c相当于php apns代码
  • Zend_Search_Lucene“在第0行的Unknown中没有堆栈帧抛出异常”
  • 在插件中模板化 - Wordpress
  • 在调用PHP后检查变量
  • 阅读twitter api用法的简单方法
  • 使用Zend_Db连接表时出错
  • 什么是编写php mysql函数的最佳方法?
  • 无法从db -php获取特定日期
  • php中的网站语言翻译
  • 如何应用正则表达式来过滤字符串
  • Wordpress帮助显示依赖于页面的帖子类别
  • 按产品类型筛选结果并按价格排序(PHP / SQL)
  • PHP - 找到匹配时停止搜索
  • SQL Query用于计算另一个查询的出现次数?
  • xDebug与特定版本的PHP
  • 性能调优MYSQL数据库

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华