Created
August 15, 2012 17:34
-
-
Save romaninsh/3361810 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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); | |
$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
for the single user, you can use this:
$path = $user->ref('filestore_file_id')->getPath();
(this shows the full image)