Phpstorm6.1 6.1 added support for Drupal programming-how to code Singularity 1. Preface
Phpstorm, as one of the best development tools supporting drupal, is the first choice for drupal module development. Today I will talk about how to add support for the drupal module in the latest phpstorm.
Related environments: ubuntu; phpstorm: 2016.1; drupal: 7
I am not very familiar with drupal. please correct me if there are any flaws.
II. specific configuration
2.1 enable Drupal integration
Menu: File-> Settings-> Language & Frameworks-> PHP-> Drupal
Select Enable Drupal integration, specify the Root directory for Drupal installation in the Drupal installation path, select Set up PHP | Include paths, and select the Drupal version.
2.2 set the Drupal code style
Menu: File> Settings> Editor> Code Style> PHP
Click "Manage..." and then click "Save As..." to create a new Scheme.
Click the "Set form..." link on the right of the interface and select Predefinded Style-> Drupal.
2.3 set Drupal file Association
Location: File-> Settings-> Editor-> File Types
First, select PHP in Recognized File Types, and then add "*. engine, X. install, X. profile ,*. test ,*. theme "(*. module is added by default)
2.4 added support for Drush
Location: File-> Settings-> Tools-> Command Line Tool Support
Click the + icon on the right, select Drush in Choose tool, and select the Drush Path in Path to Drush. The Drush shortcut is Ctrl + Shift + X (Cmd-Shift-X on Mac)
2.5 Others
How to use the help document: Right-click the function, and then click Search in Drupal API, or press Ctrl + Q (F1 on Mac ).
This completes the drupal support configuration for phpstorm2016.1.
PS:
This article was written after I learned the relevant tutorials of teacher Lao Liang. The main difference is that the IDE version used in the articles written by teacher Lao Liang in the past 14 years has been outdated, and some configuration paths have changed, therefore, the new IDE rewrite tutorial.