Mainframe in Joomla

hello world tutorial for Joomla states:

$ mainframe is a global variable in Joomla that has many useful methods attached to it.

How do you know what these methods are? I tried to find their documentation, but I did not find any clues.

+4
source share
2 answers

The $mainframe object is ultimately an instance of the JApplication class. The JApplication class JApplication defined in libraries/joomla/application/application.php . Depending on whether you are in the admin section or the Joomla interface, the $mainframe object is a direct instance of JAdministrator or JSite respectively. These classes are in includes/application.php and administrator/includes/application.php .

+5
source

In joomla 2.5, the global $ mainframe is not available through the $ global mainframe. Use the following code instead of the global $ mainframe.

 $mainframe=JFactory::getApplication(); 

Visit this url for more information.

https://bitbucket.org/joomla/joomla-platform/raw/247ba8d88526096394c44dee8b9e5f4c7e315afc/libraries/joomla/application/application.php

+5
source

Source: https://habr.com/ru/post/1306089/


All Articles