Not able to have a Live Template within a PHP class context?
I see a "class member" context, but that doesn't work when I want to add a code snippet to create a private function within a class... "class member" seems to be considered "within a function or variable", which is sort of a weird context. A class "member" according to PHP is a "property", which is a function (method) or var... and I rarely reproduce code within those contexts.

Note that when I try to run the template (by typing `logfun` then hitting Tab), nothing happens; it just adds the text "logfun" then a Tab character. Also note: please don't ask me why I have to even use this snippet... some of our repos are decrepit and this is the quickest and safest way I have to debug under our time constraints.
Am I misunderstanding what PHPStorm means by "class member" (or is JetBrains?), or do I need to do another step to make it work right?
请先登录再写评论。
Hi there,
Works just fine for me:
Usage (note: you can invoke "Code | Insert Live Template..." to see (and complete) all applicable live templates for current context)
P.S. "Class member" context name here seems to be just right: used to write class members (i.e. function declarations / property definition etc) -- inside the class but not inside any member yet.
OK so the "class member" context means "this template represents a class member, like a function or method, so it will only work within a class definition".
I tried it again (after restarting) and it works as expected. I'm not sure why it didn't before.
PS why doesn't Ctrl/Cmd+Enter/Return work to submit the comment here?!
All it does is create a new line. So annoying
This is ZendDesk Help Center (or something like that). It's not really a forum and not super suitable for a tech-product support (e.g. cannot easily highlight code fragments / no syntax highlighting; no attachments, terrible edit post functionality; if you see some reach styles this means that the user used some external markup editor and then copy-pasted the result here...)
Must have been some glitch.
The biggest glitch for me (that I see from time to time / rarely though): sometimes it refuses to render the Markdown file preview in certain project but works fine for another file in another project at the same time. I restart the system and it will work again...
> This is ZendDesk Help Center (or something like that). It's not really a forum
I found the forum by doing a Google search for `phpstorm forum`... it's breadcrumb at the top has Community as its parent, which is a modern term for "Forum", and is public; a helpdesk is synonymous with non-public support, which is through the Submit a Request button at the top of the main page of this forum - https://intellij-support.jetbrains.com/hc/en-us/community/topics/200367219-PhpStorm - whatever you want to call it. So if this public forum whose questions and answers are searchable from the internet is a "helpdesk", all of the terminology for it seems to be unnecessarily complicated.
I've gotten most of my tech support for PHPStorm here, so I've typically found it adequate for that. Attachments have been images which have been adequate; I've never needed to attach files. I can emulate code snippets using the tic character, I've never needed syntax highlighting. I don't understand the issues you're pointing out, or why I need all of that extra behavior just to post questions or comments or answers here.
By the way, the behavior did work after invalidating cache and restarting. Sorry I didn't try that before.