We have recently came across the issue when in some projects we have too many PHP files in a single Units/Sections folder of Custom module. As you might know this folder contains Extended classes which are used to override default functionality of In-Portal. As a result it's getting very hard to quickly locate necessary files once you reach 20+ files in there, plus they all start with e_OriginalFileName.php.
At this point, we should throughly discussion all options of making this simpler to work with. I ask everyone (including Intechnic employees) to participate in this critical decision making process.
For now we see 3 options here, but ready to look at other options too:
- under Units/Sections we create a sub-folders for each corresponding Unit name (that are extending) and put replacement files inside (ie. /modules/custom/units/sections/orders/e_order_eh.php, now it is /modules/custom/units/sections/e_order_eh.php)
- create sub-folders for each corresponding Units name (that are extending) the same way as in #1, but on the level up (ie. /modules/custom/units/orders/e_order_eh.php)
- do the same way as in #2, but re-create original module structure (ie. /modules/custom/units/in-commerce/orders/e_order_eh.php) similar to what we do with Replacement Templates now.
Again, the goal of this change is to quickly locate required file by folder tree and logically. Of course, these change will be backwards compatible.
Please speak up on what you like or don't like in the above, or propose new ideas!