General developer forum

Make flexible_table class better extendable

Picture of Tim Schroeder
Make flexible_table class better extendable

Hello everybody,

I'm developing a plugin and want to use Moodle's built-in flexible_table class (from moodle/lib/tablelib.php). In my derived table class I need access to the first / last name initial the user has selected in the initials bar. Currently I use the public deprecated member functions get_initial_first and get_initial_last for that. They are, however, deprecated.

So my suggestion is: instead of removing these methods in a future release, we could just make them protected thus still usable by derived classes. Here's an example of how I would implement this:

What do you think about this?

Average of ratings: -