Gazley Posted August 7, 2012 Share Posted August 7, 2012 Hi - I use PHP storm and wondered whether anyone has managed to get code completion against the ProcessWire global variables when editing templates? Thanks! Link to comment Share on other sites More sharing options...
Pete Posted August 7, 2012 Share Posted August 7, 2012 That's not currently possible, but there is a topic all about it here: PHP Storm and other IDEs are mentioned. In the meantime, your handiest reference is here: http://processwire.com/api/cheatsheet/ Link to comment Share on other sites More sharing options...
Gazley Posted August 7, 2012 Author Share Posted August 7, 2012 Hi Pete - thanks for the references. Is the cheatsheet the normal way to go? --Gary Link to comment Share on other sites More sharing options...
Pete Posted August 7, 2012 Share Posted August 7, 2012 It's the easiest function reference, but not the easiest way to get started - I would try the following: Small Project Walkthrough is a good starter The rest of the documentation, specifically selectors because you'll work with them most Scouring the rest of the tutorials forum 2, 3 and the help on the forums is where I got started since the walkthrough tutorial wasn't available at the time. Once I got going and the Cheatsheet was created by Soma it has proven invaluable ever since. Link to comment Share on other sites More sharing options...
Soma Posted August 7, 2012 Share Posted August 7, 2012 Actually this topic might be better: Link to comment Share on other sites More sharing options...
Pete Posted August 7, 2012 Share Posted August 7, 2012 Ah yes - forgot about that one. Once those changes are in it will be in the default download You can download interrobang's version from the link he posts to see if that helps in PHP Storm, but I'd still suggest reading up on the other things above too. Link to comment Share on other sites More sharing options...
Gazley Posted August 7, 2012 Author Share Posted August 7, 2012 Thanks Guys! Link to comment Share on other sites More sharing options...
interrobang Posted August 8, 2012 Share Posted August 8, 2012 In order to get use phpstorms codesense you must tell phpstorm what variables are there. Just add a PHPDoc comment like this to your php template files and it should work. Even without using my fork you get some codesense support, but a lot of properties are missing. /** * @var Pages $pages * @var Page $page * @var Templates $templates * @var Fields $fields * @var Users $users * @var User $user * @var Roles $roles * @var Permissions $permissions * @var WireInput $input * @var Sanitizer $sanitizer * @var Session $session * @var Config $config */ 1 Link to comment Share on other sites More sharing options...
ryan Posted August 9, 2012 Share Posted August 9, 2012 I've been adding all of interrobang's PHPDoc comments to the core source code dev branch (great additions interrobang!) so thinking this will help a lot too. Link to comment Share on other sites More sharing options...
saml Posted June 12, 2014 Share Posted June 12, 2014 Getting processwire autocompletion in the top PHP IDE PHPStorm would be killer. In the meantime, I just realized how much more useful the ProcessWire Cheatsheet is, when using the search feature more.Inspired by the awesome devdocs, I tried searching with "$page-> [Enter]", "$files-> [Enter]" etc, and found out how much faster I find results. Maybe the search box should be more prominently placed in the cheatsheet, and be named something like "filter" rather than "search" to highlight how it works? (I don't tend to like to get thrown away to another search page to find stuff, but love when I can filter the stuff in the current view). Link to comment Share on other sites More sharing options...
adrianmak Posted April 25, 2016 Share Posted April 25, 2016 Getting processwire autocompletion in the top PHP IDE PHPStorm would be killer. In the meantime, I just realized how much more useful the ProcessWire Cheatsheet is, when using the search feature more. Inspired by the awesome devdocs, I tried searching with "$page-> [Enter]", "$files-> [Enter]" etc, and found out how much faster I find results. Maybe the search box should be more prominently placed in the cheatsheet, and be named something like "filter" rather than "search" to highlight how it works? (I don't tend to like to get thrown away to another search page to find stuff, but love when I can filter the stuff in the current view). how to use devdocs to search pw's api? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now