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

@return array
482712
private function getLayerVariables()
    {
        $variables = [];
        $layer     = $this->catalogLayer;

        if ($layer) {
            $layerState = $layer->getState();
            foreach ($layerState->getFilters() as $currentFilter) {
                $identifier = $currentFilter->getRequestVar();

                if ($currentFilter->getFilter()) {
                    $identifier = $currentFilter->getFilter()->getRequestVar();
                }

                $filterValue = $this->getRequest()->getParam($identifier, '');
                if (is_array($filterValue)) {
                    $filterValue = implode('|', $filterValue);
                }
                $variables['product_list.filters.' . $identifier] = html_entity_decode($filterValue);
            }
        }

        return $variables;
    }
80021
public function getVariableRefs()
	{
		$variableRefs = array();

		foreach ( $this->filters as $filter )
		{
			$variableRefs = array_merge( $variableRefs, $filter->getVariableRefs() );
		}

		return $variableRefs;
	}
359373
protected function getPageList()
    {
        //Get CMS page list
        $obPageList = $this->getCmsPageList();

        //Get static page list
        $obStaticPageList = $this->getStaticPageList();
        if (!empty($obStaticPageList)) {
            if (empty($obPageList)) {
                return $obStaticPageList;
            }

            $obPageList = $obPageList->merge($obStaticPageList->all());
        }

        return $obPageList;
    }
619861
protected function getVariables()
    {
        foreach ($this->fields as $field) {
            $field->fill($this->data);
        }

        return [
            'fields' => $this->fields,
            'attributes' => $this->formatAttribute(),
            'method' => $this->attributes['method'],
        ];
    }
1223410
public function getSettings()
    {
        $settings = [];
        $settings['page'] = $this->getPage();
        $settings['limit'] = $this->getLimit();
        $settings['orders'] = $this->getOrder();
        return $settings;
    }
1190172
protected function getVariables() {
        if (!$this->_variables) {
            $this->_variables = new VariableList(
                $this->version,
                $this->solution['serviceSid'],
                $this->solution['sid']
            );
        }

        return $this->_variables;
    }
851248
public function getLoadedProductCollection()
    {
        $params = $this->getRequest()->getParams();
        //check for param code and id
        if (! isset($params['order_id']) ||
            ! isset($params['code']) ||
            ! $this->helper->isCodeValid($params['code'])
        ) {
            $this->helper->log('Product recommendation for this order not found or invalid code');
            return [];
        }

        //products to be displayed for recommended pages
        $orderId = (int) $this->getRequest()->getParam('order_id');
        //display mode based on the action name
        $mode = $this->getRequest()->getActionName();
        $orderModel = $this->orderFactory->create();
        $this->orderResource->load($orderModel, $orderId);
        //number of product items to be displayed
        $limit = $this->recommendedHelper
            ->getDisplayLimitByMode($mode);
        $orderItems = $orderModel->getAllItems();
        $numItems = count($orderItems);

        //no product found to display
        if ($numItems == 0 || !$limit) {
            return [];
        } elseif ($numItems > $limit) {
            $maxPerChild = 1;
        } else {
            $maxPerChild = number_format($limit / $numItems);
        }

        $this->helper->log(
            'DYNAMIC PRODUCTS : limit ' . $limit . ' products : '
            . $numItems . ', max per child : ' . $maxPerChild
        );

        $productsToDisplayCounter = 0;
        $productsToDisplay = $this->recommendedHelper->getProductsToDisplay(
            $orderItems,
            $mode,
            $productsToDisplayCounter,
            $limit,
            $maxPerChild
        );

        //check for more space to fill up the table with fallback products
        if ($productsToDisplayCounter < $limit) {
            $productsToDisplay = $this->recommendedHelper->fillProductsToDisplay(
                $productsToDisplay,
                $productsToDisplayCounter,
                $limit
            );
        }

        $this->helper->log('loaded product to display ' . count($productsToDisplay));

        return $productsToDisplay;
    }
715738
protected function getListProduct()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        $list = (array) $this->product->getList($conditions);
        $this->prepareListProduct($list);

        return $list;
    }
760348
public function getListItems()
    {
        $item_arr = [];
        foreach ($this->items as $item)
        {
            $item_arr[$item->id] = $item->title;
        }
        return $item_arr;
    }
1238313
protected function getProductsWishlist()
    {
        $list = $this->getWishlist();

        if (empty($list)) {
            return array();
        }

        $ids = array();

        foreach ((array) $list as $result) {
            $ids[] = $result['product_id'];
        }

        $conditions = array('product_id' => $ids);

        $options = array(
            'buttons' => array(
                'cart_add', 'wishlist_remove', 'compare_add')
        );

        return $this->getProducts($conditions, $options);
    }
1093266
public function getWishlist()
    {
        $conditions = array(
            'product_status' => 1,
            'user_id' => $this->cart_uid,
            'store_id' => $this->store_id
        );

        return (array) $this->wishlist->getList($conditions);
    }
1039225
public function getProductNames()
    {
        $items = $this->getOrder()->getAllItems();
        $productNames = [];
        foreach ($items as $item) {
            if ($item->getParentItemId() === null) {
                $productNames[] = str_replace('"', ' ', $item->getName());
            }
        }
        return json_encode($productNames);
    }
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()];
    }
970602
private function getProductVariables()
    {
        $variables = [];

        if ($this->registry->registry('current_product')) {
            $product = $this->registry->registry('current_product');
            $variables['product.id'] = $product->getId();
            $variables['product.label'] = $product->getName();
            $variables['product.sku'] = $product->getSku();
        }

        return $variables;
    }
591772
public function getVariables() 
	{
		$order = null;
		if(!isset($this->query['sort']) || $this->query['sort'] != $this->key) {
			$this->query['sort'] = $this->key;
			$this->query['order'] = self::ASC;
		} else if($this->query['order'] == self::ASC) {
			$order = self::ASC;
			$this->query['order'] = self::DESC;
		} else {
			$order = self::DESC;
			$this->query['order'] = self::ASC;
		}
		
		return array(
			'url'	=> $this->url,
			'query' => $this->query,
			'label' => $this->label,
			'order'	=> strtolower($order),
			'class'	=> $this->className);
	}
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;
    }
630310
public function listAction()
    {
        $products = $this->container->get('vespolina.product_manager')->findBy(array());

        return $this->container->get('templating')->renderResponse('VespolinaCommerceBundle:Product:list.html.'.$this->getEngine(), array('products' => $products));
    }