protected function addPatternData ($xml, $table, $arrOrder, $intParentID)
	{
			// Get all content patterns
			$objContentPattern = $this->Database->prepare("SELECT * FROM tl_pattern WHERE pid=?")
									   ->execute($intParentID);
			
			// Add the rows
			while ($objContentPattern->next())
			{
				$this->addDataRow($xml, $table, $objContentPattern->row(), $arrOrder);
				
				if (in_array($objContentPattern->type, $GLOBALS['TL_CTP_SUB']))
				{
					$this->addPatternData($xml, $table, $arrOrder, $objContentPattern->id);
				}
			}
	
	}
protected function addPatternData ($xml, $table, $arrOrder, $intParentID)
	{
			// Get all content patterns
			$objContentPattern = $this->Database->prepare("SELECT * FROM tl_pattern WHERE pid=?")
									   ->execute($intParentID);
			
			// Add the rows
			while ($objContentPattern->next())
			{
				$this->addDataRow($xml, $table, $objContentPattern->row(), $arrOrder);
				
				if (in_array($objContentPattern->type, $GLOBALS['TL_CTP_SUB']))
				{
					$this->addPatternData($xml, $table, $arrOrder, $objContentPattern->id);
				}
			}
	
	}
protected function addPatternData ( $ xml , $ table , $ arrOrder , $ intParentID ) { // Get all content patterns $ objContentPattern = $ this -> Database -> prepare ( "SELECT * FROM tl_pattern WHERE pid=?" ) -> execute ( $ intParentID ) ; // Add the rows while ( $ objContentPattern -> next ( ) ) { $ this -> addDataRow ( $ xml , $ table , $ objContentPattern -> row ( ) , $ arrOrder ) ; if ( in_array ( $ objContentPattern -> type , $ GLOBALS [ 'TL_CTP_SUB' ] ) ) { $ this -> addPatternData ( $ xml , $ table , $ arrOrder , $ objContentPattern -> id ) ; } } }
Add pattern recursively
Add pattern recursively