XF 2.0 Is there a way to extend "repositories"

Jean-Baptiste

Well-known member
Hello,

I would like to extend a repository. How can I do that in XF2 ? What is the concerned listener ?

Best regards.
 
Simply extend class. Admin panel -> development -> class extensions.

Base class name: XF\Repository\Whatever
Extension class name: Your\Namespace\Repository\Whatever
 
Simply extend class. Admin panel -> development -> class extensions.

Base class name: XF\Repository\Whatever
Extension class name: Your\Namespace\Repository\Whatever
To avoid confusion with your own addons using the same repository name for whatever reason, I would recommend Your\Namespace\XF\Repository\Whatever as the extension class name.

Doing it this way properly separates class extensions from your own XF2 code.


Fillip
 
Back
Top Bottom