original_string: protected function prepareVars()
      {
          clearstatcache();
  
          $folder = $this->getCurrentFolder();
          $viewMode = $this->getViewMode();
          $filter = $this->getFilter();
          $sortBy = $this->getSortBy();
          $sortDirection = $this->getSortDirection();
          $searchTerm = $this->getSearchTerm();
          $searchMode = strlen($searchTerm) > 0;
  
          if (!$searchMode) {
              $this->vars['items'] = $this->listFolderItems($folder, $filter, ['by' => $sortBy, 'direction' => $sortDirection]);
          }
          else {
              $this->vars['items'] = $this->findFiles($searchTerm, $filter, ['by' => $sortBy, 'direction' => $sortDirection]);
          }
  
          $this->vars['currentFolder'] = $folder;
          $this->vars['isRootFolder'] = $folder == self::FOLDER_ROOT;
          $this->vars['pathSegments'] = $this->splitPathToSegments($folder);
          $this->vars['viewMode'] = $viewMode;
          $this->vars['thumbnailParams'] = $this->getThumbnailParams($viewMode);
          $this->vars['currentFilter'] = $filter;
          $this->vars['sortBy'] = $sortBy;
          $this->vars['sortDirection'] = $sortDirection;
          $this->vars['searchMode'] = $searchMode;
          $this->vars['searchTerm'] = $searchTerm;
          $this->vars['sidebarVisible'] = $this->getSidebarVisible();
      }
code: protected function prepareVars()
      {
          clearstatcache();
  
          $folder = $this->getCurrentFolder();
          $viewMode = $this->getViewMode();
          $filter = $this->getFilter();
          $sortBy = $this->getSortBy();
          $sortDirection = $this->getSortDirection();
          $searchTerm = $this->getSearchTerm();
          $searchMode = strlen($searchTerm) > 0;
  
          if (!$searchMode) {
              $this->vars['items'] = $this->listFolderItems($folder, $filter, ['by' => $sortBy, 'direction' => $sortDirection]);
          }
          else {
              $this->vars['items'] = $this->findFiles($searchTerm, $filter, ['by' => $sortBy, 'direction' => $sortDirection]);
          }
  
          $this->vars['currentFolder'] = $folder;
          $this->vars['isRootFolder'] = $folder == self::FOLDER_ROOT;
          $this->vars['pathSegments'] = $this->splitPathToSegments($folder);
          $this->vars['viewMode'] = $viewMode;
          $this->vars['thumbnailParams'] = $this->getThumbnailParams($viewMode);
          $this->vars['currentFilter'] = $filter;
          $this->vars['sortBy'] = $sortBy;
          $this->vars['sortDirection'] = $sortDirection;
          $this->vars['searchMode'] = $searchMode;
          $this->vars['searchTerm'] = $searchTerm;
          $this->vars['sidebarVisible'] = $this->getSidebarVisible();
      }
code_tokens: protected function prepareVars ( ) { clearstatcache ( ) ; $ folder = $ this -> getCurrentFolder ( ) ; $ viewMode = $ this -> getViewMode ( ) ; $ filter = $ this -> getFilter ( ) ; $ sortBy = $ this -> getSortBy ( ) ; $ sortDirection = $ this -> getSortDirection ( ) ; $ searchTerm = $ this -> getSearchTerm ( ) ; $ searchMode = strlen ( $ searchTerm ) > 0 ; if ( ! $ searchMode ) { $ this -> vars [ 'items' ] = $ this -> listFolderItems ( $ folder , $ filter , [ 'by' => $ sortBy , 'direction' => $ sortDirection ] ) ; } else { $ this -> vars [ 'items' ] = $ this -> findFiles ( $ searchTerm , $ filter , [ 'by' => $ sortBy , 'direction' => $ sortDirection ] ) ; } $ this -> vars [ 'currentFolder' ] = $ folder ; $ this -> vars [ 'isRootFolder' ] = $ folder == self :: FOLDER_ROOT ; $ this -> vars [ 'pathSegments' ] = $ this -> splitPathToSegments ( $ folder ) ; $ this -> vars [ 'viewMode' ] = $ viewMode ; $ this -> vars [ 'thumbnailParams' ] = $ this -> getThumbnailParams ( $ viewMode ) ; $ this -> vars [ 'currentFilter' ] = $ filter ; $ this -> vars [ 'sortBy' ] = $ sortBy ; $ this -> vars [ 'sortDirection' ] = $ sortDirection ; $ this -> vars [ 'searchMode' ] = $ searchMode ; $ this -> vars [ 'searchTerm' ] = $ searchTerm ; $ this -> vars [ 'sidebarVisible' ] = $ this -> getSidebarVisible ( ) ; }
docstring: Internal method to prepare view variables.
  @return array
docstring_tokens: Internal method to prepare view variables .