protected function renderRegion($region, $template)
    {
        if (!isset($this->data[$region])) {
            return $this->render($template, $this->data);
        }

        $this->data[$region] = (array) $this->data[$region];
        gplcart_array_sort($this->data[$region]);

        $items = array();

        foreach ($this->data[$region] as $item) {
            $items[] = isset($item['rendered']) ? (string) $item['rendered'] : (string) $item;
        }

        $this->data[$region] = $this->render($template, array($region => $items));
        return $this->data[$region];
    }
protected function renderRegion($region, $template)
    {
        if (!isset($this->data[$region])) {
            return $this->render($template, $this->data);
        }

        $this->data[$region] = (array) $this->data[$region];
        gplcart_array_sort($this->data[$region]);

        $items = array();

        foreach ($this->data[$region] as $item) {
            $items[] = isset($item['rendered']) ? (string) $item['rendered'] : (string) $item;
        }

        $this->data[$region] = $this->render($template, array($region => $items));
        return $this->data[$region];
    }
protected function renderRegion ( $ region , $ template ) { if ( ! isset ( $ this -> data [ $ region ] ) ) { return $ this -> render ( $ template , $ this -> data ) ; } $ this -> data [ $ region ] = ( array ) $ this -> data [ $ region ] ; gplcart_array_sort ( $ this -> data [ $ region ] ) ; $ items = array ( ) ; foreach ( $ this -> data [ $ region ] as $ item ) { $ items [ ] = isset ( $ item [ 'rendered' ] ) ? ( string ) $ item [ 'rendered' ] : ( string ) $ item ; } $ this -> data [ $ region ] = $ this -> render ( $ template , array ( $ region => $ items ) ) ; return $ this -> data [ $ region ] ; }
Renders a region
@param string $region
@param string $template
@return string
Renders a region