* [bug] add getFiltersForSave.
This commit is contained in:
@@ -1231,6 +1231,24 @@ class pivotState
|
||||
return $type == 'object' ? $langs : json_encode($langs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get filters.
|
||||
*
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return object|string
|
||||
*/
|
||||
public function getFiltersForSave($type = 'object')
|
||||
{
|
||||
$filters = $this->filters;
|
||||
foreach($filters as $index => $filter)
|
||||
{
|
||||
if(isset($filter['items'])) unset($filters[$index]['items']);
|
||||
}
|
||||
if($type == 'object') return $filters;
|
||||
return json_encode($filters);
|
||||
}
|
||||
|
||||
/**
|
||||
* Judge is queried.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user