(no commit message)
authorAnja <aleichsenring@ab-softlab.de>
Wed, 29 May 2013 08:49:17 +0000 (01:49 -0700)
committerAnja <aleichsenring@ab-softlab.de>
Wed, 29 May 2013 08:49:17 +0000 (01:49 -0700)
gistfile1.txt

index 7600646db3e553874819f1cdbec0553d290842ad..cf2b4b349e8540c1a7e6a3618798b1d4345add03 100644 (file)
@@ -58,4 +58,59 @@ TCA
                                ),
                        ),
                ),
-...
\ No newline at end of file
+...
+
+Model:
+
+/**
+ * images to use in the gallery
+ *
+ * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
+ * @lazy
+ */
+protected $images;
+
+/**
+ * __construct
+ *
+ * @return AbstractObject
+ */
+public function __construct() {
+       $this->images = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
+}
+
+/**
+ * sets the Images
+ *
+ * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $images
+ *
+ * @return void
+ */
+public function setImages($images) {
+       $this->images = $images;
+}
+
+/**
+ * get the Images
+ *
+ * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
+ */
+public function getImages() {
+       if ($this->images instanceof LazyLoadingProxy) {
+               $this->images->_loadRealInstance();
+       }
+       $images = array();
+       /** @var \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileReference */
+       foreach ($this->images as $fileReference) {
+               $images[] = $fileReference->getOriginalResource();
+       }
+       return $images;
+}
+
+Fluid View (this is a Partial, providing all images with a link to open it in a lightbox, classic clickenlarge):
+
+<f:for each="{images}" as="image" >
+       <a href="{f:uri.image(src:image.uid,treatIdAsReference:1)}" class="lightbox" rel="gallery">
+               <f:image src="{image.uid}" alt="" width='101' height="67" treatIdAsReference="1"/>
+       </a >
+</f:for >
\ No newline at end of file