J3.x

J3.x:Discover on which client your extension code is running

From Joomla! Documentation

Revision as of 17:44, 16 March 2017 by Sandra97 (talk | contribs) (Marked this version for translation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Joomla! 
≥ 3.7
version

This article gives an overview of the JFactory::getApplication()->isClient() method introduced in Joomla! 3.7.
It replaces the JFactory::getApplication()->isSite() and JFactory::getApplication()->isAdmin() methods.

Frontend

JFactory::getApplication()->isClient('site')
Returns true if executed in the Joomla! website frontend.

Administrator / Backend

JFactory::getApplication()->isClient('administrator')
Returns true if executed in the Joomla! website backend / administrator area.

Administrator / Backend

JFactory::getApplication()->isClient('installation')
Returns true if executed in the Joomla! installation.