Class containing data for my overview block.
More...
Class containing data for my overview block.
- Copyright
- 2018 Bas Brands bas@m.nosp@m.oodl.nosp@m.e.com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
block_myoverview\output\main::__construct |
( |
|
$grouping, |
|
|
|
$sort, |
|
|
|
$view, |
|
|
|
$paging, |
|
|
|
$customfieldvalue = null |
|
) |
| |
main constructor.
Initialize the user preferences
- Parameters
-
string | $grouping | Grouping user preference |
string | $sort | Sort user preference |
string | $view | Display user preference |
int | $paging | |
string | $customfieldvalue | |
- Exceptions
-
◆ export_for_template()
block_myoverview\output\main::export_for_template |
( |
renderer_base |
$output | ) |
|
Export this data so it can be used as the context for a mustache template.
- Parameters
-
- Return values
-
array | Context variables for the template |
- Exceptions
-
Implements templatable.
◆ format_layout_for_export()
block_myoverview\output\main::format_layout_for_export |
( |
|
$layoutname | ) |
|
Format a layout into an object for export as a Context variable to template.
- Parameters
-
- Return values
-
stdClass::$layout | an object representation of a layout |
- Exceptions
-
◆ get_customfield_values_for_export()
block_myoverview\output\main::get_customfield_values_for_export |
( |
| ) |
|
Get the list of values to add to the grouping dropdown.
- Return values
-
object[] | containing name, value and active fields |
◆ get_formatted_available_layouts_for_export()
block_myoverview\output\main::get_formatted_available_layouts_for_export |
( |
| ) |
|
Get the available layouts formatted for export.
- Return values
-
array | an array of objects representing available layouts |
◆ get_preferences_as_booleans()
block_myoverview\output\main::get_preferences_as_booleans |
( |
| ) |
|
Get the user preferences as an array to figure out what has been selected.
- Return values
-
array::$preferences | Array with the pref as key and value set to true |
◆ set_available_layouts()
block_myoverview\output\main::set_available_layouts |
( |
| ) |
|
Set the available layouts based on the config table settings, if none are available, defaults to the cards view.
- Exceptions
-
The documentation for this class was generated from the following file:
- blocks/myoverview/classes/output/main.php