XF 2.0 PhpStorm - How to use questions

AndyB

Well-known member
Hello,

I have installed PhpStorm 2017.2 and created a project and brought up a PHP file. I typed in $parent-> and hit the ctrl-space and I get "No suggestions", I expected a list of available methods. What am I doing wrong?

Thank you.

1509156679028.webp
 
Last edited:
The problem here is that your class extends XFCP_Forum but this is a fake class and PhpStorm doesn’t know that behind the scenes it extends the Forum controller.

Do you have development mode enabled? The development output system should output a special hint file which PhpStorm can use to figure stuff out.
 
Could you tell me more about this "special hint file" ?
Since I am also using PhpStorm.
I allready edited :
Code:
Edit the /library/config.php file to add the following line: $config['debug'] = true;
 
Correct, although you can manually create something similar:
PHP:
<?php

/* For IDE auto-complete */

if (false)
{
    class XFCP_YourAddOn_ControllerPublic_Thread extends XenForo_ControllerPublic_Thread {}
}
 
Back
Top Bottom