Template variable getter. Returns similar recommendation lists

@return object
770264
protected function _isSearchClass()
    {
        if ($this->_blSearchClass === null) {
            $this->_blSearchClass = false;
            if ('search' == strtolower(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestControllerId())) {
                $this->_blSearchClass = true;
            }
        }

        return $this->_blSearchClass;
    }
347618
public function _getWishlistItems()
    {
        $wishlist = $this->_getWishlist();
        if ($wishlist && ! empty($wishlist->getItemCollection())) {
            return $wishlist->getItemCollection();
        } else {
            return [];
        }
    }
151052
private function getRecom($recommendation_area)
    {
        $recommendation = [];
        foreach ($recommendation_area->find('.borderClass') as $each_recom) {
            $tmp = [];

            $tmp['username'] = $this->getRecomUser($each_recom);
            $tmp['recommendation'] = $this->getRecomText($each_recom);

            $recommendation[] = $tmp;
        }

        return $recommendation;
    }
580829
public function getRecommLists()
    {
        if ($this->_oSearchRecommLists === null) {
            $this->_oSearchRecommLists = [];
            if (!$this->getActiveRecommList()) {
                // list of found oxrecommlists
                $oRecommList = oxNew(\OxidEsales\Eshop\Application\Model\RecommendationList::class);
                $oList = $oRecommList->getSearchRecommLists($this->getRecommSearch());
                if ($oList && $oList->count()) {
                    $this->_oSearchRecommLists = $oList;
                }
            }
        }

        return $this->_oSearchRecommLists;
    }
1242187
public static function lists()
    {
        // Helper Class Exists
        if (isset(self::$ListsHelper)) {
            return self::$ListsHelper;
        }
        // Initialize Class
        self::$ListsHelper = new ListsHelper();
        // Return Helper Class
        return self::$ListsHelper;
    }
494453
public function getCompArtList()
    {
        if ($this->_oArtList === null) {
            if (($aItems = $this->getCompareItems())) {
                // counts how many pages
                $oList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
                $oList->loadIds(array_keys($aItems));

                // cut page articles
                if ($this->_iArticlesPerPage > 0) {
                    $this->_iCntPages = ceil($oList->count() / $this->_iArticlesPerPage);
                    $aItems = $this->_removeArticlesFromPage($aItems, $oList);
                }

                $this->_oArtList = $this->_changeArtListOrder($aItems, $oList);
            }
        }

        return $this->_oArtList;
    }
1333098
public function getList()
	{
		if( $this->pattern )
			return new FS_Folder_RecursiveRegexFilter(
				$this->path,
				$this->pattern,
				$this->showFiles,
				$this->showFolders,
				$this->stripDotEntries
			);
		return new FS_Folder_RecursiveIterator(
			$this->path,
			$this->showFiles,
			$this->showFolders,
			$this->stripDotEntries
		);
	}
413330
protected function _getRecommendationListBredCrumb()
    {
        $paths = [];
        $recommListPath = [];
        $baseLanguageId = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
        $recommListPath['title'] = \OxidEsales\Eshop\Core\Registry::getLang()->translateString('LISTMANIA', $baseLanguageId, false);
        $paths[] = $recommListPath;

        return $paths;
    }
41339
public function getReviewList()
    {
        $currentPage = $this->getActPage();
        $itemsPerPage = $this->getItemsPerPage();
        $offset = $currentPage * $itemsPerPage;

        $userId = $this->getUser()->getId();

        $reviewModel = oxNew(Review::class);
        $reviewAndRatingList = $reviewModel->getReviewAndRatingListByUserId($userId);

        return $this->getPaginatedReviewAndRatingList(
            $reviewAndRatingList,
            $itemsPerPage,
            $offset
        );
    }
584413
public function getRecommLists()
    {
        if ($this->_aUserRecommLists === null) {
            $this->_aUserRecommLists = false;
            if (($oUser = $this->getUser())) {
                // recommendation list
                $this->_aUserRecommLists = $oUser->getUserRecommLists();
            }
        }

        return $this->_aUserRecommLists;
    }
301247
protected function getListReview()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        return (array) $this->review->getList($conditions);
    }
568267
public static function get(
    ): Collection {
        $googleTaskLists = static::getGoogleTaskLists();
        $googleLists = $googleTaskLists->listTaskLists();

        return collect($googleLists)
            ->map(function (Google_Service_Tasks_TaskList $tasklist) {
                return TaskLists::createFromGoogleTaskLists($tasklist);
            })
            ->sortBy(function (TaskLists $tasklist) {
                return $tasklist->title;
            })
            ->values();
    }
663220
public function getReviews()
    {
        $oReview = oxNew(\OxidEsales\Eshop\Application\Model\Review::class);
        $oRevs = $oReview->loadList('oxrecommlist', $this->getId());
        //if no review found, return null
        if ($oRevs->count() < 1) {
            return null;
        }

        return $oRevs;
    }
641109
public function index()
    {
        // For single-item display only, redirect to the relevant show/edit page
        if ($this->modelInformation->single) {
            return $this->returnViewForSingleDisplay();
        }

        $this->resetStateBeforeIndexAction()
             ->checkListParents()
             ->applyListParentContext()
             ->checkActiveSort()
             ->checkScope()
             ->checkFilters()
             ->checkActivePage();

        $totalCount  = $this->getTotalCount();
        $scopeCounts = $this->getScopeCounts();

        $this->applySort()
             ->applyScope($this->modelRepository);

        $query = $this->getModelRepository()->query();

        $this->applyFilter($query)
             ->applyListParentToQuery($query);

        $records = $query->paginate($this->getActualPageSize(), ['*'], 'page', $this->getActualPage());

        // Check and whether page is out of bounds and adjust
        if ($this->getActualPage() > $records->lastPage()) {
            $records = $query->paginate($this->getActualPageSize(), ['*'], 'page', $records->lastPage());
        }

        $currentCount = method_exists($records, 'total') ? $records->total() : 0;

        return view($this->getIndexView(), [
            'moduleKey'           => $this->moduleKey,
            'routePrefix'         => $this->routePrefix,
            'permissionPrefix'    => $this->permissionPrefix,
            'model'               => $this->modelInformation,
            'records'             => $records,
            'recordReferences'    => $this->getReferenceRepository()->getReferencesForModels($records->items()),
            'totalCount'          => $totalCount,
            'currentCount'        => $currentCount,
            'listStrategies'      => $this->getListColumnStrategyInstances(),
            'sortColumn'          => $this->getActualSort(),
            'sortDirection'       => $this->getActualSortDirection(),
            'pageSize'            => $this->getActualPageSize(),
            'pageSizeOptions'     => $this->getPageSizeOptions(),
            'filterStrategies'    => $this->renderedListFilterStrategies($this->getActiveFilters()),
            'activeScope'         => $this->getActiveScope(),
            'scopeCounts'         => $scopeCounts,
            'unconditionalDelete' => $this->isUnconditionallyDeletable(),
            'defaultRowAction'    => $this->getDefaultRowActionInstance(),
            'hasActiveListParent' => (bool) $this->listParentRelation,
            'listParents'         => $this->listParents,
            'topListParentOnly'   => $this->showsTopParentsOnly(),
            'draggableOrderable'  => $this->isListOrderDraggable($totalCount, $currentCount),
            'availableExportKeys' => $this->getAvailableExportStrategyKeys(),
        ]);
    }
1188143
public function getItemList()
    {
        if ($this->_oList === null && $this->_sListClass) {
            $this->_oList = oxNew($this->_sListType);
            $this->_oList->clear();
            $this->_oList->init($this->_sListClass);

            $where = $this->buildWhere();

            $listObject = $this->_oList->getBaseObject();

            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable('tabelle', $this->_sListClass);
            $this->_aViewData['listTable'] = getViewName($listObject->getCoreTableName());
            \OxidEsales\Eshop\Core\Registry::getConfig()->setGlobalParameter('ListCoreTable', $listObject->getCoreTableName());

            if ($listObject->isMultilang()) {
                // is the object multilingual?
                /** @var \OxidEsales\Eshop\Core\Model\MultiLanguageModel $listObject */
                $listObject->setLanguage(\OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage());

                if (isset($this->_blEmployMultilanguage)) {
                    $listObject->setEnableMultilang($this->_blEmployMultilanguage);
                }
            }

            $query = $this->_buildSelectString($listObject);
            $query = $this->_prepareWhereQuery($where, $query);
            $query = $this->_prepareOrderByQuery($query);
            $query = $this->_changeselect($query);

            // calculates count of list items
            $this->_calcListItemsCount($query);

            // setting current list position (page)
            $this->_setCurrentListPosition(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('jumppage'));

            // setting addition params for list: current list size
            $this->_oList->setSqlLimit($this->_iCurrListPos, $this->_getViewListSize());

            $this->_oList->selectString($query);
        }

        return $this->_oList;
    }
1366557
public function getList($list)
    {
        if (isset(self::$refs[$list])) {
            self::$refs[$list]['counter']++;
            return \Erebot\Module\Wordlists\Proxy(
                self::$refs[$list]['instance']
            );
        }

        $lists = $this->getAvailableLists();
        if (!in_array($list, $lists)) {
            throw new \Erebot\Module\Wordlists\BadListNameException($list);
        }

        $listObject = new \Erebot\Module\Wordlists\Wordlist(
            $this,
            $list,
            self::$cache[$list]
        );

        self::$refs[$list] = array(
            'counter'   => 1,
            'instance'  => $listObject,
        );
        return new \Erebot\Module\Wordlists\Proxy($listObject);
    }
1344151
public function getList()
	{
		$this->getResponse()
			->setStatusCode(Response::STATUS_CODE_200);
		
		// 1) getting params
		$page = (int) $this->params()->fromQuery("page", 1);
		$category = $this->params()->fromQuery("category", "usato");
		$purpose = $this->params()->fromQuery("purpose", "compravendita");
		$location = $this->params()->fromQuery("location", "italia");
		$limit = 30;
		$offset = ($page * $limit) - $limit;
		$returnSelect = true;
		
		// 2) Discard useless params and prepare them to be passed to the model
		$params = $this->requestToSearchParams($this->params()->fromQuery());
		$params = is_array($params) ? $params + compact('returnSelect', 'offset', 'limit') : array();
		
		if(empty($params)) {
            return new JsonModel(array());
		}
		
		// 3) get only for current user?
		$onlyCurrentUser = (bool) $this->params()->fromQuery("current", false);
		$k = 0;
		foreach($params['field'] as $f) {
			if('current' == $f || 'user' == $f) {
				unset($params['field'][$k]);
				unset($params['value'][$k]);
			}
			$k++;
		}
		if($onlyCurrentUser) {
			if($this->zfcUserAuthentication()->hasIdentity()) {
				$identity = $this->zfcUserAuthentication()->getIdentity();
// 				$params['field'][] = 'user';
// 				$params['value'][] = sha1('neo' . $identity->getUserId() . 'bazaar');
				$params['field'][] = 'account';
				$params['value'][] = sha1('neo' . $identity->getUserId() . 'bazaar');
			} else {
				// Questo è necessario per non far restituire la lista completa se l'utente non è connesso
				$params['field'][] = 'account';
				$params['value'][] = sha1('usernotconnected');
			}
		}
		
		// 4) all classifieds? This should be requested only by the admin, will not use sphinx
		if((bool) $this->params()->fromQuery("full", false)) {
			if($this->zfcUserAuthentication()->hasIdentity()) {
			    $params = $this->params()->fromQuery();
				$identity = $this->zfcUserAuthentication()->getIdentity();
				$userModel = $this->getServiceLocator()->get('user.model.user');
				$userModel->init($identity, $this->getServiceLocator());
				if(!$userModel->getIsAdmin()) {
				    return new JsonModel(array());
				}
				
				$paginator = $this->getServiceLocator()->get('document.paginator.classifiedFull');
				$paginator->build($params);

				$data = array();
				foreach($paginator as $post) {
            		$file = $this->getServiceLocator()->get('document.model.classifiedAdminListing');
				    $data[] = $file->init($post);
				}

				$routeName = 'DocumentAdminClassified/page';
				$routeParams = array('page' => $this->params()->fromQuery("page", 1));
				$queryParams = array('full' => 1, 'user' => $this->params()->fromQuery("user"));
				$data = $this->getModel()->getPaginationData($this->getServiceLocator(), $paginator, $data, $routeName, $routeParams, $queryParams);

				return new JsonModel($data);
			}
		}
		
		// 5) Pass param to the model and get the data
		$data = $this->getModel()->getList($params, $this->getServiceLocator());
		
		return new JsonModel($data);
	}