protected function _renderThemeFiles($scope = 'file')
    {
        $this->_blocksCollection->setScope($scope);

        $themeBuilder = PageBuilder::make(ThemeBuilderInstance::class, [new PageLoaderDummy($this->_additionalData['theme']->theme), $this->_blocksCollection]);
        if ($this->_templateList) {
            foreach ($this->_templateList as $templateName) {
                $templateView = 'themes.' . $this->_additionalData['theme']->theme . '.templates.' . $templateName;
                if (View::exists($templateView)) {
                    $themeBuilder->setData('template', $templateName);
                    $themeBuilder->setRenderPath([['template' => $templateName]]);
                    try {
                        View::make($templateView)->render();
                    } catch (\Exception $e) {
                        $this->_importErrors[] = $e;
                    }
                }
            }
            $this->_renderedOrders = $themeBuilder->getOrders();
        }

        // make sure every csv block is rendered & better after theme render as there is less context
        $this->_renderCsvBlocks($themeBuilder);
    }
protected function _renderThemeFiles($scope = 'file')
    {
        $this->_blocksCollection->setScope($scope);

        $themeBuilder = PageBuilder::make(ThemeBuilderInstance::class, [new PageLoaderDummy($this->_additionalData['theme']->theme), $this->_blocksCollection]);
        if ($this->_templateList) {
            foreach ($this->_templateList as $templateName) {
                $templateView = 'themes.' . $this->_additionalData['theme']->theme . '.templates.' . $templateName;
                if (View::exists($templateView)) {
                    $themeBuilder->setData('template', $templateName);
                    $themeBuilder->setRenderPath([['template' => $templateName]]);
                    try {
                        View::make($templateView)->render();
                    } catch (\Exception $e) {
                        $this->_importErrors[] = $e;
                    }
                }
            }
            $this->_renderedOrders = $themeBuilder->getOrders();
        }

        // make sure every csv block is rendered & better after theme render as there is less context
        $this->_renderCsvBlocks($themeBuilder);
    }
protected function _renderThemeFiles ( $ scope = 'file' ) { $ this -> _blocksCollection -> setScope ( $ scope ) ; $ themeBuilder = PageBuilder :: make ( ThemeBuilderInstance :: class , [ new PageLoaderDummy ( $ this -> _additionalData [ 'theme' ] -> theme ) , $ this -> _blocksCollection ] ) ; if ( $ this -> _templateList ) { foreach ( $ this -> _templateList as $ templateName ) { $ templateView = 'themes.' . $ this -> _additionalData [ 'theme' ] -> theme . '.templates.' . $ templateName ; if ( View :: exists ( $ templateView ) ) { $ themeBuilder -> setData ( 'template' , $ templateName ) ; $ themeBuilder -> setRenderPath ( [ [ 'template' => $ templateName ] ] ) ; try { View :: make ( $ templateView ) -> render ( ) ; } catch ( \ Exception $ e ) { $ this -> _importErrors [ ] = $ e ; } } } $ this -> _renderedOrders = $ themeBuilder -> getOrders ( ) ; } // make sure every csv block is rendered & better after theme render as there is less context $ this -> _renderCsvBlocks ( $ themeBuilder ) ; }
Get all extra block data from theme files
@param string $scope
Get all extra block data from theme files