Talk:Creating a System Plugin to augment JRouter
From Joomla! Documentation
(Difference between revisions)
m (moved Talk:Using a System Plugin to augment JRouter to Talk:Creating a System Plugin to augment JRouter: following current standard)
Revision as of 06:54, 10 April 2012
From within a plugin, there are 2 ways to get the currently active application context. One is to use the global $app variable:
The other is to use JFactory to get the application.
$app = JFactory::getApplication('site');
Which is the preferred option?