我有一个模型Profile
<?php
class Model_Profile extends Model_Table {
public $table = 'profile';
function init(){
parent::init();
...
$m = $this->add('filestore/Field_Image');
}
}
现在在我的index.php
,我试图在模板中设置完整的图像路径。
$m = $this->add('Model_Profile')->loadBy('user_id',$this->api->auth->get('id'));
//Here i want to var_dump the full image path example (/admin/upload/0/20131123014011__photo-on-23-11-2013-at-01.36.jpg)
这会显示表 filestore_file 中的图像 ID。
die('Filestore image:' . $m->get('filestore_field_image'));
与此主题相关的讨论: https ://groups.google.com/forum/#!topic/agile-toolkit-devel/i-i9OK4Ya1A
我试过这个
$fm = $this->add('filestore/Field_Image')->load($m->get('filestore_field_image'));
var_dump($fm->getThumbURLExpr());
但它抛出了一个异常
其他链接: