nurkka Posted yesterday at 02:23 PM Share Posted yesterday at 02:23 PM Hi all! I currently have fun using latte templates within ProcessWire via RockFrontend. After trying for many weeks now, I was finally able to implement some code completion / code suggestions by doing this: {varType ProcessWire\DefaultPage $page} <section class="container"> <div class="row"> <div class="col"> {$page->doSomething()} </div> </div> </section> So, by adding the first line, my IDE (PHPStorm) recognizes the $page variable and gives me code completion/suggestions, e.g. listing all available methods of $page (which in this case has the class DefaultPage). But I had no luck with the ProcessWire functions like page(), config(), etc. – they are not recognized at all by the IDE. Does anyone know how to make an IDE aware of those functions in LATTE? It would be great if one could use LATTE exactly as if one was writing PHP. 2 Link to comment Share on other sites More sharing options...
nurkka Posted 2 hours ago Author Share Posted 2 hours ago I just discovered this post from @interrobang with an update for the PHPStorm Metadata File .phpstorm.meta.php in /wire/core/ . Although this has not directly anything to do with LATTE, I leave the link here because it really helps with autocompletion/code suggestions in PHPStorm, e.g. it now also suggests hooks. Thanks @interrobang! 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