Use PhpStorm as an IDE for Joomla! development.
Before you start
Download and install Joomla!.
Enable the Joomla! plugin
This functionality relies on the Joomla! plugin, which is bundled and enabled in PhpStorm by default. If the relevant features aren't available, make sure that you didn't disable the plugin.
Press Control+Alt+S to open the IDE settings and then select.
Open the Installed tab, find the Joomla! plugin, and select the checkbox next to the plugin name.
Joomla! support includes:
Ability to create a new project.
JHTML::_($argument)is used, PhpStorm navigates with Control+LeftClick on the first argument to the corresponding class or method.
For example, consider the following code:<?php $options = JHtml::_('select.option', $eid, $extension_name);
select.optionleads to navigation to the
optionmethod of the class
When all the other constructs are used, PhpStorm navigates with Control+LeftClick on the first argument to the corresponding property in the .ini file. For example, in the code$msg = JText::sprintf('COM_INSTALLER_INSTALL_ERROR', JText::_('COM_INSTALLER_TYPE_TYPE_' . strtoupper($package['type'])));
'COM_INSTALLER_INSTALL_ERROR'leads to navigation to the property
'COM_INSTALLER_INSTALL_ERROR'in the file en-GB.com_installer.ini.
PhpStorm detects Joomla when opening a Joomla! module/plugin/extension or a Joomla! root folder, and suggests enabling Joomla! support, and adjusting namespaces.
DocBlocks standards for PHP files, classes, class properties, and so on. When Joomla! support is recognized, PhpStorm suggests installing DocBlocks:
PhpStorm suggests importing the Joomla! code style. See section Configure Joomla! support
PhpStorm detects databases in projects. Click in the Database tool window tool window and choose Import from sources... The settings specified in the file configuration.php are detected and used for the new data source connection.
PhpStorm provides database prefixes support and changes
#__to the prefix that is defined in the
$dbprefixfield in the configuration.php file.
It is worth noting that a database dialect should be selected on the SQL Dialects page of the Settings dialog (Control+Alt+S). Note also that the type of the selected dialect should match your database type.