Example #1
0
 function renderCell(&$ar)
 {
     $ar->__image = '';
     foreach ($ar->getValuesAsArray() as $value) {
         if (is_string($value) && preg_match('/getImage.php\\?id=(\\d+)/', $value, $m)) {
             $id = $m[1];
             $ar->__image = org_glizy_helpers_Media::getResizedImageById($id, true, __Config::get('movio.thumb.entityList.width'), __Config::get('movio.thumb.entityList.height'), __Config::get('movio.thumb.entityList.crop'));
             break;
         }
     }
     if ($ar->__image == '') {
         $ar->__image = '<img src="' . __Config::get('movio.noImage.src') . '" width="' . __Config::get('movio.thumb.entityList.width') . '" height="' . __Config::get('movio.thumb.entityList.height') . '"/>';
     }
     // TODO: verificare perché viene letto dalla request
     if (!__Request::get('visualization')) {
         $ar->visualization = 'list';
     } else {
         $ar->visualization = __Request::get('visualization');
     }
 }