/**
  * List action
  *
  * @param int $offset The offset
  *
  * @return void
  */
 public function listAction($offset = 0)
 {
     if ($this->settings['fileCollection'] !== '' && $this->settings['fileCollection']) {
         $collectionUids = explode(',', $this->settings['fileCollection']);
         $imageItems = $this->fileCollectionService->getFileObjectsFromCollection($collectionUids);
         $cObj = $this->configurationManager->getContentObject();
         $currentUid = $cObj->data['uid'];
         $paginationArray = array('itemsPerPage' => $this->settings['imagesPerPage'], 'maximumVisiblePages' => $this->settings['numberOfPages'], 'insertAbove' => $this->settings['insertAbove'], 'insertBelow' => $this->settings['insertBelow']);
         $this->view->assignMultiple(array('imageItems' => $imageItems, 'offset' => $offset, 'paginationConfiguration' => $paginationArray, 'settings' => $this->settings, 'currentUid' => $currentUid));
     }
 }
 /**
  * Get FileObject from collection descending
  *
  * @param string $sorting Sorting direction
  * @param string $fileName The filename
  *
  * @test
  * @dataProvider sortingDataProviderDesc
  *
  * @return void
  */
 public function getFileObjectFromCollectionDesc($sorting, $fileName)
 {
     $this->fileCollectionMock->expects($this->any())->method('getItems')->will($this->returnValue($this->getFileFixture($sorting)));
     $this->frontendConfigurationManagerMock->expects($this->once())->method('getConfiguration')->will($this->returnValue(array('settings' => array('order' => 'desc'))));
     $imageItems = $this->subject->getFileObjectsFromCollection(array(1));
     $itemCount = count($imageItems);
     for ($i = 0; $i < $itemCount; $i++) {
         $this->assertEquals($fileName[$i], $imageItems[$i]->getName());
     }
 }