Differences Between: [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]
Class containing data for my overview block.
Copyright: | 2017 Ryan Wyllie <ryan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 474 lines (18 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
__construct($grouping, $sort, $view, $paging, $customfieldvalue = null) X-Ref |
main constructor. Initialize the user preferences param: string $grouping Grouping user preference param: string $sort Sort user preference param: string $view Display user preference param: int $paging param: string $customfieldvalue |
get_fallback_grouping($config) X-Ref |
Determine the most sensible fallback grouping to use (in cases where the stored selection is no longer available). param: object $config return: string |
set_available_layouts() X-Ref |
Set the available layouts based on the config table settings, if none are available, defaults to the cards view. |
get_preferences_as_booleans() X-Ref |
Get the user preferences as an array to figure out what has been selected. return: array $preferences Array with the pref as key and value set to true |
format_layout_for_export($layoutname) X-Ref |
Format a layout into an object for export as a Context variable to template. param: string $layoutname return: \stdClass $layout an object representation of a layout |
get_formatted_available_layouts_for_export() X-Ref |
Get the available layouts formatted for export. return: array an array of objects representing available layouts |
get_customfield_values_for_export() X-Ref |
Get the list of values to add to the grouping dropdown return: object[] containing name, value and active fields |
export_for_template(renderer_base $output) X-Ref |
Export this data so it can be used as the context for a mustache template. param: \renderer_base $output return: array Context variables for the template |