public static function inc($path, $extensionId = null, $data = array()) {
        $context = \Context::getInstance();
        if (!is_null($extensionId) && $extensionId != $context->getExtensionName()) {
            // template is within different extension, change context
            $formerContext = $context->getExtensionName();
            $context->setExtensionName($extensionId);
        }

        if(count($data) > 0){
            \RenderContext::pushContext($data);
        }
        
        $absPath = self::getTemplate($path, $extensionId);
        if (file_exists($absPath)) {
            include($absPath);
        } else {
            \common_Logger::w('Failed to include "'.$absPath.'" in template');
        }
        // restore context
        if (isset($formerContext)) {
            $context->setExtensionName($formerContext);
        }
    }
public static function inc($path, $extensionId = null, $data = array()) {
        $context = \Context::getInstance();
        if (!is_null($extensionId) && $extensionId != $context->getExtensionName()) {
            // template is within different extension, change context
            $formerContext = $context->getExtensionName();
            $context->setExtensionName($extensionId);
        }

        if(count($data) > 0){
            \RenderContext::pushContext($data);
        }
        
        $absPath = self::getTemplate($path, $extensionId);
        if (file_exists($absPath)) {
            include($absPath);
        } else {
            \common_Logger::w('Failed to include "'.$absPath.'" in template');
        }
        // restore context
        if (isset($formerContext)) {
            $context->setExtensionName($formerContext);
        }
    }
public static function inc ( $ path , $ extensionId = null , $ data = array ( ) ) { $ context = \ Context :: getInstance ( ) ; if ( ! is_null ( $ extensionId ) && $ extensionId != $ context -> getExtensionName ( ) ) { // template is within different extension, change context $ formerContext = $ context -> getExtensionName ( ) ; $ context -> setExtensionName ( $ extensionId ) ; } if ( count ( $ data ) > 0 ) { \ RenderContext :: pushContext ( $ data ) ; } $ absPath = self :: getTemplate ( $ path , $ extensionId ) ; if ( file_exists ( $ absPath ) ) { include ( $ absPath ) ; } else { \ common_Logger :: w ( 'Failed to include "' . $ absPath . '" in template' ) ; } // restore context if ( isset ( $ formerContext ) ) { $ context -> setExtensionName ( $ formerContext ) ; } }
Expects a relative url to the template that is to be included as path
if extension name is omitted the current extension is used

@param string $path
@param string $extensionId
@param array $data bind additional data to the context
@return string
Expects a relative url to the template that is to be included as path if extension name is omitted the current extension is used