Return list of product list variables (pages, sort, display mode)

@return array
@throws \Magento\Framework\Exception\LocalizedException
509245
private function getProductListVariables()
    {
        $variables = [];

        $productListBlock = $this->getProductListBlock();

        if ($productListBlock !== null && $productListBlock->getCollection()) {
            $variables['product_list.page_count'] = $productListBlock->getLastPageNum();
            $variables['product_list.product_count'] = $productListBlock->getTotalNum();
            $variables['product_list.current_page'] = $productListBlock->getCurrentPage();
            $variables['product_list.sort_order'] = $productListBlock->getCurrentOrder();
            $variables['product_list.sort_direction'] = $productListBlock->getCurrentDirection();
            $variables['product_list.display_mode'] = $productListBlock->getCurrentMode();
        }

        return $variables;
    }
860001
public function getList()
    {
        $result = &gplcart_static('product.compare.list');

        if (isset($result)) {
            return (array) $result;
        }

        $this->hook->attach('product.compare.list.before', $result, $this);

        if (isset($result)) {
            return (array) $result;
        }

        $cookie = $this->request->cookie('product_compare', '', 'string');
        $result = array_filter(array_map('trim', explode('|', urldecode($cookie))), 'ctype_digit');
        $this->hook->attach('product.compare.list.after', $result, $this);
        return $result;
    }
1127021
protected function _getPageVariables()
    {
        $table = $this->_table();
        $controller = $this->_controller();
        $scope = $this->_action()->getConfig('scope');

        $data = [
            'modelClass' => $controller->modelClass,
            'singularHumanName' => Inflector::humanize(Inflector::underscore(Inflector::singularize($controller->modelClass))),
            'pluralHumanName' => Inflector::humanize(Inflector::underscore($controller->getName())),
            'singularVar' => Inflector::singularize($controller->getName()),
            'pluralVar' => Inflector::variable($controller->getName()),
        ];

        try {
            $data += [
                'modelSchema' => $table->getSchema(),
                'displayField' => $table->getDisplayField(),
                'primaryKey' => $table->getPrimaryKey(),
            ];
        } catch (Exception $e) {
            // May be empty if there is no table object for the action
        }

        if ($scope === 'entity') {
            $data += [
                'primaryKeyValue' => $this->_primaryKeyValue()
            ];
        }

        return $data;
    }
150180
public function getList()
    {
        $sites = $this->siteManager->findAll();
        $this->addPaginationData($sites);
        $sites = $sites->getItems();
        if (empty($sites)) {
            $this->addInfoMessage(self::INFO_NO_ENTRIES_FOUND);
        }
        return $sites;
    }
1281263
protected function getItems()
    {
        $list = $this->DataSource->getItems($this->pagesize * ($this->currentpage - 1), $this->getPageSize(), $this->sortf, $this->sortd);
        $this->pagerowscount = count($list);
        return is_array($list) ? $list : array();
    }
703846
public function variables() : array
    {
        return [
            'placeholder' => $this->placeholder,
            'icon'        => $this->icon,
            'type'        => $this->type,
            'group'       => $this->filter->group,
        ];
    }
1355189
public function getSelectionList()
    {
        if ($this->_aSelectionList === null) {
            $this->_aSelectionList = [];

            $oProduct = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
            $oProduct->load($this->getEditObjectId());

            if ($oCatList = $this->_getCategoryList($oProduct)) {
                $this->_aSelectionList["oxcategory"][$this->_iEditLang] = $oCatList;
            }

            if ($oVndList = $this->_getVendorList($oProduct)) {
                $this->_aSelectionList["oxvendor"][$this->_iEditLang] = $oVndList;
            }

            if ($oManList = $this->_getManufacturerList($oProduct)) {
                $this->_aSelectionList["oxmanufacturer"][$this->_iEditLang] = $oManList;
            }
        }

        return $this->_aSelectionList;
    }
73781
private function getUnsortedProductData()
    {
        $productCollection = $this->getProductCollection()->setPageSize($this->size);

        if (!in_array($this->search, [null, ''])) {
            $productCollection->setSearchQuery($this->search);
        }

        return ['products' => $productCollection->getItems(), 'size' => $productCollection->getSize()];
    }
311755
public function getVariableRefs()
	{
		$variableRefs = array();

		if ( $this->dataTypes )
		{
			if ( isset( $this->dataTypes['qnameXPath2Expressions'] ) && $this->dataTypes['qnameXPath2Expressions'] )
			foreach ( $this->dataTypes['qnameXPath2Expressions'] as $qnameXPath2Expression )
			{
				$variableRefs = array_merge( $variableRefs, $qnameXPath2Expression->getParameterQNames() );
			}
		}

		return $variableRefs;
	}
249586
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllProducts(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllProducts();
        }
    }
760348
public function getListItems()
    {
        $item_arr = [];
        foreach ($this->items as $item)
        {
            $item_arr[$item->id] = $item->title;
        }
        return $item_arr;
    }
253366
public function getVariables() 
	{
		$variables = parent::getVariables();
		
		$loaded = self::$loaded;
		self::$loaded = true;
		
		$variables['loaded'] = $loaded;
		$variables['options'] = $this->options;
		
		return $variables;
	}
1132298
public function variables()
    {
        return [
            'id'         => $this->elementId,
            'tools'      => $this->tools->render(),
            'items'      => $this->getItems(),
            'useCreate'  => $this->useCreate,
            'useSave'    => $this->useSave,
            'useRefresh' => $this->useRefresh,
        ];
    }
355090
public function getVariables()
    {
        if (!$this->getUseIndex()) {
            return array();
        }

        $staticVariables = $this->reflection->getStaticVariables();

        // When looping through the variables, we will only take the variables that are
        // specified in the use clause, and will not take any other static variables
        // that may be used by the Closures, allowing this to re-create its state.
        $usedVariables = array();

        foreach ($this->getUseClauseVariables() as $variable) {
            $variable = trim($variable, ' $&');

            $usedVariables[$variable] = $staticVariables[$variable];
        }

        return $usedVariables;
    }
347618
public function _getWishlistItems()
    {
        $wishlist = $this->_getWishlist();
        if ($wishlist && ! empty($wishlist->getItemCollection())) {
            return $wishlist->getItemCollection();
        } else {
            return [];
        }
    }
477736
public function getVariables()
    {
        $variables = [];

        if ($this->page->getId()) {
            $variables['cms.identifier'] = $this->page->getIdentifier();
            $variables['cms.title']      = $this->page->getTitle();
        }

        return $variables;
    }
945161
public function scriptVariables()
    {
        $lang = trans('sleeping_owl::lang');
        if ($lang == 'sleeping_owl::lang') {
            $lang = trans('sleeping_owl::lang', [], 'en');
        }

        return [
            'debug' => config('app.debug'),
            'env' => $this->app->environment(),
            'locale' => $this->app['translator']->getLocale(),
            'url' => $this->app['url']->to('/'),
            'lang' => $lang,
            'wysiwyg' => $this->config['wysiwyg'],
            'template' => $this->app[TemplateInterface::class]->toArray(),
            'user_id' => auth()->id(),
        ];
    }