I'm trying to add a method to the Group class using a DataExtension. The module I am modifying already adds DataExtensions to the Member and Member_Validating classes like this:
protected static function on_register() {
Object::add_extension('Member', 'ExternalAuthenticatedRole');
Object::add_extension('Member_Validator', 'ExternalAuthenticatedRole_Validator');
return parent::on_register();
}
So I added my own line, before line 2:
Object::add_extension('Group', 'GroupObjectRole');
I added a file called GroupObjectRole.php to the same folder, and added a class GroupObjectRole extends DataExtension. However this results in a fatal error:
Fatal error: Object::add_extension() - Can't find extension class for "GroupObjectRole" in framework\core\Object.php on line 452
What am I doing wrong?