browse_sort_links¶
Summary¶
- browse_sort_links(array $links, array $wrapperTags = Array)¶
Return the list of links for sorting displayed records.
Parameters: - $links (array) – The links to sort the headings. Should correspond to the metadata displayed.
- $wrapperTags (array) – The tags and attributes to use for the browse headings * ‘list_tag’ The HTML tag to use for the containing list * ‘link_tag’ The HTML tag to use for each list item (the browse headings) * ‘list_attr’ Attributes to apply to the containing list tag * ‘link_attr’ Attributes to apply to the list item tag
Returns: string
Usage¶
Generates HTML elements for sorting based on the metadata given.
When the records are presented as a table, as in most admin browse views, $wrapperTags should be:
array('link_tag' => 'th scope="col"', 'list_tag' => '')
Otherwise, you will want to add text and/or styling to make clear that the list presented is for sorting the displayed records.