Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 200 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

activity_header:: (3 methods):
  __construct()
  is_title_allowed()
  set_attrs()

member:: (7 methods):
  set_hidecompletion()
  set_additionalnavitems()
  set_hideoverflow()
  set_title()
  set_description()
  disable()
  export_for_template()


Class: activity_header  - X-Ref

Data structure representing standard components displayed on the activity header.

Consists of title, header, description. In addition, additional_items can be provided which is a url_select

__construct(moodle_page $page, \stdClass $user)   X-Ref
Constructor for activity_header

param: moodle_page $page
param: \stdClass $user

is_title_allowed()   X-Ref
Checks if the theme has specified titles to be displayed.

return: bool

set_attrs(array $config)   X-Ref
Bulk set class member variables. Only updates variables which have corresponding setters

param: mixed[] $config Array of variables to set, with keys being their name. Valid names/types as follows:

Class: member  - X-Ref

set_hidecompletion(bool $value)   X-Ref
Sets the hidecompletion class member variable

param: bool $value

set_additionalnavitems(url_select $value)   X-Ref
Sets the additionalnavitems class member variable

param: url_select $value

set_hideoverflow(bool $value)   X-Ref
Sets the hideoverflow class member variable

param: bool $value

set_title(string $value)   X-Ref
Sets the title class member variable.

param: string $value

set_description(string $value)   X-Ref
Sets the description class member variable

param: string $value

disable()   X-Ref
Disable the activity header completely. Use this if the page has some custom content, headings to be displayed.


export_for_template(renderer_base $output)   X-Ref
Export items to be rendered with a template.

return: array
param: renderer_base $output