mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
(Experimental) Export a DBSearch as an array/JSON structure.
This commit is contained in:
@@ -463,6 +463,20 @@ class DBUnionSearch extends DBSearch
|
||||
return $sRet;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @see DBSearch::ToJSON()
|
||||
*/
|
||||
public function ToJSON()
|
||||
{
|
||||
$sRet = array('unions' => array());
|
||||
foreach ($this->aSearches as $oSearch)
|
||||
{
|
||||
$sRet['unions'][] = $oSearch->ToJSON();
|
||||
}
|
||||
return $sRet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new DBUnionSearch object where duplicates queries have been removed based on their OQLs
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user