Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$m=$this;
$m->thumb=$m
->leftJoin('filestore_file','filestore_file_id')
->leftJoin('filestore_image.original_file_id',null,'left')
->leftJoin('filestore_file','thumb_file_id','left');
;
$m->vol=$m->thumb->leftJoin('filestore_volume',null,'left');
$m->addExpression('thumb',function($m,$s){
return $s->expr(
'COALESCE(
concat('.
$m->vol->fieldExpr('dirname').
',"/",'.
$m->thumb->fieldExpr('filename').
')
, "templates/default/images/profile.jpg") ');
})->visible(true);
@romaninsh

This comment has been minimized.

Copy link
Owner Author

romaninsh commented Aug 15, 2012

for the single user, you can use this:

$path = $user->ref('filestore_file_id')->getPath();

(this shows the full image)

@romaninsh

This comment has been minimized.

Copy link
Owner Author

romaninsh commented Aug 15, 2012

$path = $user->ref('filestore_file_id')->ref('thumb_file_id')->getPath();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.