Extend users module

lehel - 4 months ago

Hello! How can i extend Users-module TableBuilder. I want to add roles to the users columns.

ryanthompson - 4 months ago

You can bind your own table builder to it using a service provider somewhere.

YourUserTableBuilder::class => UserTableBuilder::class

Using YourUserTableBuilder::class => UserTableBuilder::class in a register method or normal service provider OR $container->bind() like in an addon service provider will do it.

HEADS UP: In this case there are no handler classes sitting next to the builder: https://github.com/anomalylabs/users-module/tree/2.2/src/User/Table BUT if there were - let's say a protected $bindings = []; handler right next to it you would have to add that to YOUR table builder like UserTableButtons.

Again not the case here but good to know when extending other UI

ryanthompson - 4 months ago

This is also something that could probably be added to the table as it is anyways.. some UI work needs to be done!