subbu royal
subbu royal

Reputation: 624

How find a controller class for a request in BroadLeaf Commerce framework

We are using a BroadLeaf Commerce framework to build an e-commerce site. In that admin can set a roles for user, BLC given beautiful UI to do this functionality. With the help of +add button I can set role for a user and it is adding into database table. But I am trying to debug a code to know the functionality the problem is for that +add button I am unable to find which controller is taking the request, can anyone help me how to find the controller class? below is the html code for add button

<button class="" type="button" data-queryparams="?sectionCrumbs=user-management--251" data-urlpostfix="/add" data-actionurl="/admin/user-management/251/allRoles/add/"> Add </button>

I also tried to post this question in BLC forum, but no use

Upvotes: 0

Views: 132

Answers (1)

user4046031
user4046031

Reputation:

  • If you inspect adding roles to user you get request url something like
~/user-management/-1/allRoles/add
  • Controller that has /user-managment request mapping is AdminUserManagementController

  • But AdminUserManagementController methods have only /id mappings so that's not controller that will handle request

  • It's super class is AdminBasicEntityController and it has right mapping

/{sectionKey:.+}/{id}/{collectionField:.*}/add
  • method for adding roles to users is addCollectionItem

Upvotes: 1

Related Questions