1

I was learning plugin development when I came across this.

so for some plugin, I see

class pluginA extends JPlugin

for some others, I see

class plgGantryEasyblog extends \Joomla\CMS\Plugin\CMSPlugin

Are they the same thing? If not, what is the difference? I can't find documentations about this.

1 Answer 1

4

JPlugin is an alias of Joomla\CMS\Plugin\CMSPlugin. It is the same thing at the moment, but one should start using fully qualified class names because all aliases in Joomla! are deprecated and will be removed in the future - a few in 4.0 and everything else in 5.0.

Relevant PHP documenation: Using namespaces: Aliasing/Importing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.