Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core\output\activity_header Class Reference
Inheritance diagram for core\output\activity_header:
renderable templatable

Public Member Functions

 __construct (moodle_page $page, stdClass $user)
 Constructor for activity_header.
 
 disable ()
 Disable the activity header completely.
 
 export_for_template (renderer_base $output)
 Export items to be rendered with a template.
 
 get_heading_level (int $defaultlevel=2)
 Get the heading level for a given heading depending on whether the theme's activity header displays a heading (usually the activity name).
 
 is_title_allowed ()
 Checks if the theme has specified titles to be displayed.
 
 set_additionalnavitems (url_select $value)
 Sets the additionalnavitems class member variable.
 
 set_attrs (array $config)
 Bulk set class member variables.
 
 set_description (string $value)
 Sets the description class member variable.
 
 set_hidecompletion (bool $value)
 Sets the hidecompletion class member variable.
 
 set_hideoverflow (bool $value)
 Sets the hideoverflow class member variable.
 
 set_title (string $value)
 Sets the title class member variable.
 

Protected Attributes

url_select $additionalnavitems
 $additionalnavitems Any additional custom navigation elements to be injected into template.
 
string $description
 $description The description to be displayed.
 
bool $hidecompletion
 $hidecompletion Whether to show completion criteria, if available, or not
 
bool $hideheader
 $hideheader Whether or not to show the header
 
bool $hideoverflow
 $hideoverflow Whether to show the overflow data or not
 
moodle_page $page
 $page The current page we are looking at
 
string $title
 $title The title to be displayed in the header.
 
stdClass $user
 $user The user we are dealing with
 

Constructor & Destructor Documentation

◆ __construct()

core\output\activity_header::__construct ( moodle_page $page,
stdClass $user )

Constructor for activity_header.

Parameters
moodle_page$page
stdClass$user

Member Function Documentation

◆ disable()

core\output\activity_header::disable ( )

Disable the activity header completely.

Use this if the page has some custom content, headings to be displayed.

◆ export_for_template()

core\output\activity_header::export_for_template ( renderer_base $output)

Export items to be rendered with a template.

Parameters
renderer_base$output
Return values
array

Implements templatable.

◆ get_heading_level()

core\output\activity_header::get_heading_level ( int $defaultlevel = 2)

Get the heading level for a given heading depending on whether the theme's activity header displays a heading (usually the activity name).

Parameters
int$defaultlevelThe default heading level when the activity header does not display a heading.
Return values
int

◆ is_title_allowed()

core\output\activity_header::is_title_allowed ( )

Checks if the theme has specified titles to be displayed.

Return values
bool

◆ set_additionalnavitems()

core\output\activity_header::set_additionalnavitems ( url_select $value)

Sets the additionalnavitems class member variable.

Parameters
url_select$value

◆ set_attrs()

core\output\activity_header::set_attrs ( array $config)

Bulk set class member variables.

Only updates variables which have corresponding setters

Parameters
mixed[]$configArray of variables to set, with keys being their name. Valid names/types as follows: 'hidecompletion' => bool 'additionalnavitems' => url_select 'hideoverflow' => bool 'title' => string 'description' => string

◆ set_description()

core\output\activity_header::set_description ( string $value)

Sets the description class member variable.

Parameters
string$value

◆ set_hidecompletion()

core\output\activity_header::set_hidecompletion ( bool $value)

Sets the hidecompletion class member variable.

Parameters
bool$value

◆ set_hideoverflow()

core\output\activity_header::set_hideoverflow ( bool $value)

Sets the hideoverflow class member variable.

Parameters
bool$value

◆ set_title()

core\output\activity_header::set_title ( string $value)

Sets the title class member variable.

Parameters
string$value

Member Data Documentation

◆ $description

string core\output\activity_header::$description
protected

$description The description to be displayed.

Defaults to activityrecord intro.

◆ $title

string core\output\activity_header::$title
protected

$title The title to be displayed in the header.

Defaults to activityrecord name.


The documentation for this class was generated from the following file: