/**
  * action list
  *
  * @return void
  */
 public function listAction()
 {
     if ($this->settings['use_ajax']) {
         $this->settings['limit'] = $this->settings['ajax_limit'];
     }
     if (!$this->settings['sort_by']) {
         $this->settings['sort_by'] = "updated";
     }
     if (!$this->settings['sort_direction']) {
         $this->settings['sort_direction'] = "DESC";
     }
     if (!$this->settings['limit']) {
         $this->settings['limit'] = 25;
     }
     if ($this->settings['source'] == "api") {
         // Get the extensions's configuration
         $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['moox_social']);
         if ($this->settings['api_slideshare_key'] == "") {
             $this->settings['api_slideshare_key'] = $extConf['fallbackSlideshareApiKey'];
         }
         if ($this->settings['api_slideshare_secret_key'] == "") {
             $this->settings['api_slideshare_secret_key'] = $extConf['fallbackSlideshareApiSecretKey'];
         }
         if ($this->settings['api_slideshare_key'] != "" && $this->settings['api_slideshare_secret_key'] != "") {
             $posts = $this->slideshareRepository->requestAllBySettings($this->settings);
         }
     } else {
         $count = $this->slideshareRepository->findAll($this->settings['user_id'])->count();
         $posts = $this->slideshareRepository->findAllBySettings($this->settings);
     }
     $this->view->assign('currentpid', $GLOBALS['TSFE']->id);
     $this->view->assign('posts', $posts);
     $this->view->assign('count', $count);
     $pages = array();
     for ($i = 1; $i <= ceil($count / $this->settings['limit']); $i++) {
         $pages[] = array("id" => $i, "offset" => ($i - 1) * $this->settings['limit']);
     }
     $this->view->assign('pages', $pages);
     $this->view->assign('pagesCount', count($pages));
     $this->view->assign('maxOffset', ($i - 2) * $this->settings['limit']);
 }