protected function deployItem(core_kernel_classes_Resource $item, $languageCode, $compiledDirectory)
    {
        $itemService = taoItems_models_classes_ItemsService::singleton();
        	
        // copy local files
        $sourceDir = $itemService->getItemDirectory($item, $languageCode);
        $success = taoItems_helpers_Deployment::copyResources($sourceDir->getPrefix(), $compiledDirectory, array('index.html'));
        if (!$success) {
            return $this->fail(__('Unable to copy resources for language %s', $languageCode));
        }
        
        // render item
        
        $xhtml = $itemService->render($item, $languageCode);
        	
        // retrieve external resources
        $subReport = taoItems_helpers_Deployment::retrieveExternalResources($xhtml, $compiledDirectory);
        if ($subReport->getType() == common_report_Report::TYPE_SUCCESS) {
            $xhtml = $subReport->getData();
            // write index.html
            file_put_contents($compiledDirectory.'index.html', $xhtml);
            return new common_report_Report(
                common_report_Report::TYPE_SUCCESS,
                __('Published "%1$s" in language "%2$s"', $item->getLabel(), $languageCode)
            );
        } else {
            return $subReport;
        }
    }
protected function deployItem(core_kernel_classes_Resource $item, $languageCode, $compiledDirectory)
    {
        $itemService = taoItems_models_classes_ItemsService::singleton();
        	
        // copy local files
        $sourceDir = $itemService->getItemDirectory($item, $languageCode);
        $success = taoItems_helpers_Deployment::copyResources($sourceDir->getPrefix(), $compiledDirectory, array('index.html'));
        if (!$success) {
            return $this->fail(__('Unable to copy resources for language %s', $languageCode));
        }
        
        // render item
        
        $xhtml = $itemService->render($item, $languageCode);
        	
        // retrieve external resources
        $subReport = taoItems_helpers_Deployment::retrieveExternalResources($xhtml, $compiledDirectory);
        if ($subReport->getType() == common_report_Report::TYPE_SUCCESS) {
            $xhtml = $subReport->getData();
            // write index.html
            file_put_contents($compiledDirectory.'index.html', $xhtml);
            return new common_report_Report(
                common_report_Report::TYPE_SUCCESS,
                __('Published "%1$s" in language "%2$s"', $item->getLabel(), $languageCode)
            );
        } else {
            return $subReport;
        }
    }
protected function deployItem ( core_kernel_classes_Resource $ item , $ languageCode , $ compiledDirectory ) { $ itemService = taoItems_models_classes_ItemsService :: singleton ( ) ; // copy local files $ sourceDir = $ itemService -> getItemDirectory ( $ item , $ languageCode ) ; $ success = taoItems_helpers_Deployment :: copyResources ( $ sourceDir -> getPrefix ( ) , $ compiledDirectory , array ( 'index.html' ) ) ; if ( ! $ success ) { return $ this -> fail ( __ ( 'Unable to copy resources for language %s' , $ languageCode ) ) ; } // render item $ xhtml = $ itemService -> render ( $ item , $ languageCode ) ; // retrieve external resources $ subReport = taoItems_helpers_Deployment :: retrieveExternalResources ( $ xhtml , $ compiledDirectory ) ; if ( $ subReport -> getType ( ) == common_report_Report :: TYPE_SUCCESS ) { $ xhtml = $ subReport -> getData ( ) ; // write index.html file_put_contents ( $ compiledDirectory . 'index.html' , $ xhtml ) ; return new common_report_Report ( common_report_Report :: TYPE_SUCCESS , __ ( 'Published "%1$s" in language "%2$s"' , $ item -> getLabel ( ) , $ languageCode ) ) ; } else { return $ subReport ; } }
deploys the item into the given absolute directory

@param core_kernel_classes_Resource $item
@param string $languageCode
@param string $compiledDirectory
@return common_report_Report
deploys the item into the given absolute directory