code: public function getPageLayouts()
  	{
  		$objLayout = $this->Database->execute("SELECT l.id, l.name, t.name AS theme FROM tl_layout l LEFT JOIN tl_theme t ON l.pid=t.id ORDER BY t.name, l.name");
  
  		if ($objLayout->numRows < 1)
  		{
  			return array();
  		}
  
  		$return = array();
  
  		while ($objLayout->next())
  		{
  			$return[$objLayout->theme][$objLayout->id] = $objLayout->name;
  		}
  
  		return $return;
  	}
docs: Return all page layouts grouped by theme
  
  @return array