code: protected function addTableTlModule(\DOMDocument $xml, \DOMNode $tables, Result $objTheme)
  	{
  		// Add the table
  		$table = $xml->createElement('table');
  		$table->setAttribute('name', 'tl_module');
  		$table = $tables->appendChild($table);
  
  		// Load the DCA
  		$this->loadDataContainer('tl_module');
  
  		// Get the order fields
  		$objDcaExtractor = DcaExtractor::getInstance('tl_module');
  		$arrOrder = $objDcaExtractor->getOrderFields();
  
  		// Get all modules
  		$objModule = $this->Database->prepare("SELECT * FROM tl_module WHERE pid=? ORDER BY name")
  									->execute($objTheme->id);
  
  		// Add the rows
  		while ($objModule->next())
  		{
  			$this->addDataRow($xml, $table, $objModule->row(), $arrOrder);
  		}
  	}
docs: Add the table tl_module
  
  @param \DOMDocument         $xml
  @param \DOMNode|\DOMElement $tables
  @param Result               $objTheme