mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
Revert "Sortable: Allow to check for a particular sort rule"
This reverts commit ae21baa41e55e50774b4e7d42e24686bf231c25f.
This commit is contained in:
parent
0fc8e6046c
commit
cfd43f251e
@ -341,25 +341,11 @@ class SimpleQuery implements QueryInterface, Queryable, Iterator
|
|||||||
/**
|
/**
|
||||||
* Whether an order is set
|
* Whether an order is set
|
||||||
*
|
*
|
||||||
* @param string $column
|
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function hasOrder($column = null)
|
public function hasOrder()
|
||||||
{
|
{
|
||||||
if (empty($this->order)) {
|
return !empty($this->order);
|
||||||
return false;
|
|
||||||
} elseif ($column === null) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($this->order as $rule) {
|
|
||||||
if ($rule[0] === $column) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,11 +36,9 @@ interface Sortable
|
|||||||
/**
|
/**
|
||||||
* Whether an order is set
|
* Whether an order is set
|
||||||
*
|
*
|
||||||
* @param string $column
|
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function hasOrder($column = null);
|
public function hasOrder();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the order if any
|
* Get the order if any
|
||||||
|
@ -315,13 +315,11 @@ class RepositoryQuery implements QueryInterface, Iterator
|
|||||||
/**
|
/**
|
||||||
* Return whether any sort rules were applied to this query
|
* Return whether any sort rules were applied to this query
|
||||||
*
|
*
|
||||||
* @param string $column
|
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function hasOrder($column = null)
|
public function hasOrder()
|
||||||
{
|
{
|
||||||
return $this->query->hasOrder($column);
|
return $this->query->hasOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -294,13 +294,11 @@ abstract class DataView implements QueryInterface, IteratorAggregate
|
|||||||
/**
|
/**
|
||||||
* Whether an order is set
|
* Whether an order is set
|
||||||
*
|
*
|
||||||
* @param string $column
|
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function hasOrder($column = null)
|
public function hasOrder()
|
||||||
{
|
{
|
||||||
return $this->query->hasOrder($column);
|
return $this->query->hasOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user