PhpStorm Live Templates for XenForo 2

Beta PhpStorm Live Templates for XenForo 2 20210519

No permission to download
Just a note to say that @Myke623 has kindly taken the time to make Visual Studio Code versions of these snippets, as far as VSCode allows the functionality to be replicated.


Thanks @Myke623!
In this update I have fairly dramatically changed the way you have to call the code snippets.

The previous releases suffered from a problem whereby the xf component of the shortcut trigger was treated as a separate word, so xf-entity would not search automatically for xf-entity but rather would search for shortcuts beginning with entity as soon as the cursor passed the dash character.

Having understood that now, the shortcuts are revised to remove punctuation in most instances, such that the PHP shortcut xf-entity is now triggered with xfEntity instead and the Javascript shortcut XF:EventHandler is now triggered with xfEventHandler.

HTML shortcuts, with <xf:tagname format are unaffected.

This update also brings with it shortcuts for (amongst others)
  • Finder calls xfFinder
    1621420683951.png
  • Repository calls xfRepository
    1621420350485.png

  • Entity creation xfEmCreate
    1621420715221.png
  • AssertRecordExists xfAssertRecordExists
    1621420745381.png
Templates for the standard XF javascript file wrapper, element handler and event handler.
  • XF.wrapper
  • XF.ElementHandler
  • XF.EventHandler
Note - emmet completion on tab gets in the way when using ElementHandler and EventHandler, so instead of using tab to move between variable fields, hit enter.
  • Like
Reactions: mcatze and Idhae
Top