Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250605) (9223e346c3e)
mod_book\output\main_action_menu Class Reference

Output the action menu for the book activity. More...

Inheritance diagram for mod_book\output\main_action_menu:

Public Member Functions

 __construct (int $cmid, array $chapters, stdClass $chapter)
 Constructor for this class.
 
 export_for_template (\renderer_base $output)
 Exports the navigation buttons around the book.
 

Protected Member Functions

 get_chapter (int $id)
 Get the specific chapter of the book.
 
 get_next_chapter ()
 Get the next chapter in the book.
 
 get_previous_chapter ()
 Get the previous chapter in the book.
 

Protected Attributes

stdClass $chapter
 Current chapter of the book.
 
stdClass[] $chapters
 Chapters of the book.
 
int $cmid
 The course module ID.
 

Detailed Description

Output the action menu for the book activity.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

mod_book\output\main_action_menu::__construct ( int $cmid,
array $chapters,
stdClass $chapter )

Constructor for this class.

Parameters
int$cmidThe course module ID.
array$chaptersChapters of this book.
stdClass$chapterThe current chapter.

Member Function Documentation

◆ export_for_template()

mod_book\output\main_action_menu::export_for_template ( \renderer_base $output)

Exports the navigation buttons around the book.

Parameters
renderer_base$outputrenderer base output.
Return values
arrayData to render.

◆ get_chapter()

mod_book\output\main_action_menu::get_chapter ( int $id)
protected

Get the specific chapter of the book.

Parameters
int$idThe chapter id to retrieve.
Return values
?stdClassThe requested chapter.

◆ get_next_chapter()

mod_book\output\main_action_menu::get_next_chapter ( )
protected

Get the next chapter in the book.

Return values
?stdClassThe next chapter of the book.

◆ get_previous_chapter()

mod_book\output\main_action_menu::get_previous_chapter ( )
protected

Get the previous chapter in the book.

Return values
?stdClassThe previous chapter of the book.

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