Einchecken des OnlineStands

This commit is contained in:
2016-09-07 14:36:03 +00:00
parent feed788c84
commit 53295535eb
241 changed files with 69161 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<?php
class renderWidgetClass extends renderClass_abstract
{
public function createWidget ( $widgetData )
{
$html = file_get_contents ( $this -> _pathTpl . $this -> _layout . '/tpl_' . $this -> _template . '_widget_' . $widgetData[ 'tpl' ] . '.php' );
$html = str_replace ( $this -> _renderSearch , $this -> _renderReplace , $html );
foreach ( $widgetData as $key => $value )
{
$html = str_replace ( '%%' . $key . '%%' , $value , $html );
}
$subTpl = new DOMDocument ( );
$subTpl -> preserveWhitespace = false;
$subTpl -> formatOutput = true;
$subTpl -> loadHTML ( $html );
$xpath = new DOMXpath ( $subTpl );
$subCont = $xpath -> query ( ".//*[contains(concat(' ', @class, ' '), ' " . $widgetData[ 'tpl' ] . " ')]" ) -> item( 0 );
if ( isset ( $widgetData[ 'id' ] ) )
{
$subCont -> setAttributeNode ( new DOMAttr ( 'id' , 'widget_' . $widgetData[ 'id' ] ) );
}
$new_node = $this -> _tpl -> importNode ( $subCont , true );
return $new_node;
}
}
?>