MDL-81648 course: Add a method to retrieve delegate section parent

- New 'get_parent_section()' function added to sectiondelegate abstract class
This commit is contained in:
Mikel Martín
2024-05-31 10:50:20 +02:00
parent bcd8e0d6ed
commit b4ecd9d805
2 changed files with 26 additions and 0 deletions
@@ -124,4 +124,13 @@ abstract class sectiondelegate {
): ?action_menu {
return $controlmenu->get_default_action_menu($output);
}
/**
* Get the parent section of the current delegated section if any.
*
* @return section_info|null
*/
public function get_parent_section(): ?section_info {
return null;
}
}