Definition at line 9 of file image_grid.inc.
◆ __construct()
ImageGridItem::__construct |
( |
|
$grid, |
|
|
|
$image_id, |
|
|
|
$title, |
|
|
|
$text, |
|
|
|
$onclick = "return false;" |
|
) |
| |
◆ draw()
ImageGridItem::draw |
( |
|
$size, |
|
|
|
$attrs |
|
) |
| |
Definition at line 29 of file image_grid.inc.
31 $imageSize = $this->grid->retinaMode ?
$size * 2 :
$size;
32 $mode = $this->grid->useBackgroundImages ?
"thumbnail" :
"iconize";
34 $src = $this->image_id ?
"/action/image/{$mode}?image_id={$this->image_id}&size={$imageSize}" :
"/fakoli/images/noimage.gif";
37 foreach($attrs as
$name => $value)
39 $dataAttrs .=
"$name='$value' ";
44 if ($this->grid->useBackgroundImages)
46 $styles = $this->grid->inlineSizing ?
"width: {$size}px; height: {$size}px; margin: 10px'" :
"";
48 <li <?echo $cssClass?>data-details=
'<?echo $this->id?>' style=
'background-image: url(<?echo $src?>);background-size: cover;<?echo $styles?>' onclick=
'<?echo $this->onclick?>'><div
class=
'title'><?echo $this->
title?></div></li>
54 <li <?echo $cssClass?>data-details=
'<?echo $this->id?>' <?echo $dataAttrs?>
style=
'width: <?echo $size + 10?>px; height: <?echo $size + 40?>px; margin: 10px'><div onclick=
'<?echo $this->onclick?>' style=
'width: <?echo $size ?>px; height: <?echo $size + 40?>px'><img src=
"<?echo $src?>" alt=
"<?echo $this->title?>" style=
'width: <?echo $size?>px; height: <?echo $size?>px'></img><br/><?echo $this->
title?></div></li>
◆ $cssClass
ImageGridItem::$cssClass = null |
◆ $grid
◆ $id
◆ $image_id
◆ $item
◆ $onclick
◆ $text
◆ $title
The documentation for this class was generated from the following file: