Modifying code in page requirements lib

Modifying code in page requirements lib

by Di Juwel -
Number of replies: 1

Hi

in lib/outputrequirementslib.php there is a class called "page_requirements_manager".

there are two methods in this class that I would like to modify:  function "skip_to_link" and function "get_top_of_body_code"

I can't actually modify those functions because there are part of moodle's core but I would love to overwrite them from a php file that is not a core one.

How can that be done ?

I already have my own theme by way so I can do whatever I want there if I want to,

i'm using moodle 2.7

Average of ratings: -
In reply to Di Juwel

Re: Modifying code in page requirements lib

by Chris Wharton -

Hi, you could probably extend that class in your theme renderer or lib file, and write your own versions of the functions.

What are you trying to achieve though? The outputrequirementslib is not something that would normally need modification.