Back to PhocacartWishlist class

Method renderList

public
renderList
()

Method renderList - Source code

public function renderList()
{
    $db = Factory::getDBO();
    $uri = Uri::getInstance();
    $action = $uri->toString();
    $app = Factory::getApplication();
    $s = PhocacartRenderStyle::getStyles();
    $paramsC = PhocacartUtils::getComponentParameters();
    $add_wishlist_method = $paramsC->get('add_wishlist_method', 0);
    if (empty($this->itemsDb)) {
        // we asked them in construct, don't ask again
        $query = $this->getQueryList($this->items);
        if ($query) {
            $db->setQuery($query);
            $this->itemsDb = $db->loadObjectList();
        }
    }
    $d = array();
    $d['s'] = $s;
    if (!empty($this->itemsDb)) {
        $d['wishlist'] = $this->itemsDb;
        $tempItems = $this->correctItems();
        PhocacartCategoryMultiple::setBestMatchCategory($d['wishlist'], $tempItems, 1);
        // returned by reference
    }
    $d['actionbase64'] = base64_encode($action);
    $d['linkwishlist'] = Route::_(PhocacartRoute::getWishListRoute());
    $d['method'] = $add_wishlist_method;
    $layoutW = new FileLayout('list_wishlist', null, array('component' => 'com_phocacart'));
    echo $layoutW->render($d);
}