Display file structure (fuctions, etc.)

I read that PHPStorm, like netbeans, can display the structure of the file - as you see in this image: http://i.imgur.com/hL8tcbq.png

How do I enable this or something like it, in PHP storm?

Thanks..

0
10 comments

Hi.

Menubar: View ->ToolWindows -> Structure.

:-) Have fun.

0
Avatar
Permanently deleted user

Adrian,

It's almost always blank, it doesn't show any functions, classes, etc?
How do I fix that?

Thanks.

0

You have to open a file in the editor. When you put the cursor somewhere inside the file, it should show the structure.

0
Avatar
Permanently deleted user
0

It definitely shows your functions. You can see them in your picture. Which IDs? You only have Ids in css files. If you have a css file, it shows IDs...
Do you mean your $this->id? As far as I can see from your code, you have not definied $id as private or public inside your class.

If you define:

Private $id;

...you will see it in the structures view.

0
Avatar
Permanently deleted user

Sorry, I edited my message too late.

I mean <div id="test"> type of IDs. Netbeans shows them.

http://i.imgur.com/u3W21ka.jpg <-- may help.

0

As far as I can see the problem is that the file you show is plain html and the filename of that file you use is .php. I think it will show you the structure if you rename your file in e.g. index.html or so.
If you use a .php file, your file is not valid; than you have to echo all of that html structure.

0
Avatar
Permanently deleted user

The file uses php and javascript, but I guess I can't make it display HTML's divs then.

Thanks for helping me out.

0

I would recommend to split different languages into different files, and in php one class
per file. That is good practice. Mixin languages into one file will bring you into problems in my opinion sooner or later.
Best wishes!

0

Make Structure tool window wider -- you will see that it has "PHP" and "HTML" tabs

0

Please sign in to leave a comment.