As far as I can see there are no explicit naming conventions for various entities:
Class Extensions
Assuming there is a class extension for
Should the extension class be named
Or even another variant?
Code Event Listeners
Should all listeners be in one class
Keyed Entities (Phrases, Templates, etc.)
Should all phrases, templates etc. be prefixed with
Would be nice to get some info on how the community is handling this, maybe even official recommendations by @Chris D
Btw: XenForo Media Gallery does not seem to fully follow these guidelines
Templates like
Are theere any plans to change this?
This isn't quite that detailed and leaves room for interpretation.Add on data which requires unique IDs or keys (such as template modifications) must be prefixed in a way that can identify the add on or developer.
Class Extensions
Assuming there is a class extension for
XF\Entity\Post
, what would be the recommended class nameShould the extension class be named
[VendorID\]AddonID\Entity\Post
[VendorID\]AddonID\XF\Entity\Post
[VendorID\]AddonID\Extend\XF\Entity\Post
Or even another variant?
Code Event Listeners
Should all listeners be in one class
[VendorID\]AddonID\Listener
with camelCase methods named after the event and hint?Keyed Entities (Phrases, Templates, etc.)
Should all phrases, templates etc. be prefixed with
[vendorid_]addonid_
?Would be nice to get some info on how the community is handling this, maybe even official recommendations by @Chris D
Btw: XenForo Media Gallery does not seem to fully follow these guidelines
Templates like
alert_user_xfmg_album_delete
and the administrator permission mediaGallery
are not prefixed.Are theere any plans to change this?
Last edited: