ZMObject
└─ZMResultListSorter
public class ZMResultListSorter
extends ZMObject
| Field Summary | |
|---|---|
| protected mixed | |
| protected mixed | |
| protected mixed | |
| protected mixed | |
| Fields inherited from org.zenmagick.core\ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| void | __construct(string id, string name, string sortId) Create a new result list sorter. |
| string | getId() Returns the sorters unique id. |
| string | getName() Returns the sorter name. |
| array | Returns one or more ZMSortOptions supported by this sorter. |
| string | Returns the sorters sort id. |
| boolean | isActive() Returns true if this sorter is currently active. |
| boolean | Returns true if the current sort order is descending. |
| void | setDescending(boolean descending) Set the descending flag. |
| void | setId(string id) Set the sorters unique id. |
| void | setName(string name) Set the sorter name. |
| void | setSortId(mixed sortId, string id) Set the sorters sorter id. |
| array | sort(array list) Sort the given list according to this sorters criteria. |
| Methods inherited from org.zenmagick.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton | |
protected mixed $descending_
protected mixed $id_ = ''
protected mixed $name_
protected mixed $sortId_
public void __construct(string id, string name, string sortId)
Create a new result list sorter.
public string getId()
Returns the sorters unique id.
public string getName()
Returns the sorter name.
public array getOptions()
Returns one or more ZMSortOptions supported by this sorter.
ZMSortOption instances.public string getSortId()
Returns the sorters sort id.
public boolean isActive()
Returns true if this sorter is currently active.
This translates into: one of the supported sort options is active.
true if the sorter is active, false if not.public boolean isDescending()
Returns true if the current sort order is descending.
true if the current sort order is descending.public void setDescending(boolean descending)
Set the descending flag.
public void setId(string id)
Set the sorters unique id.
public void setName(string name)
Set the sorter name.
public void setSortId(mixed sortId, string id)
Set the sorters sorter id.
public array sort(array list)
Sort the given list according to this sorters criteria.
Base result list sorter.
Right now, result lists may be sorted with a single sorter only.