【发布时间】:2018-04-08 15:14:54
【问题描述】:
我是 SocialEngine 的初学者,我想知道是否有任何方法可以在小部件中获取对象的照片。 就像我知道我们可以使用以下代码获取对象的照片。
//在控制器中
$table = Engine_Api::_()->getDbTable("mytable","module");
$select = $table->select()->where->("table_id", 1);
$fetch = $table->fetchRow($select);
$this->view->fetch = $fetch;
//在视图中
echo $this->itemPhoto($this->fetch, "thumb.normal");
如果有任何图像,上面的行将生成图像,否则将加载默认图像。
但这行代码在小部件中不起作用。 我真的很感谢你的帮助。
【问题讨论】:
标签: php widget socialengine