Skip to content

Commit

Permalink
Add snippet about type hinting in Twig
Browse files Browse the repository at this point in the history
  • Loading branch information
pspanja committed Nov 21, 2019
1 parent 82bce28 commit ba9e9b7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/reference/templating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ Templating
Site API objects are used directly in the templates. Below you will find examples for the most
common use cases. Objects are documented in more detail on :doc:`Objects reference </reference/objects>` documentation page.

.. note::

If you are using PHPStorm, you can type hint Site API Content and Location objects by adding the
following snippet to your template:

.. code-block:: twig
{# content \Netgen\EzPlatformSiteApi\API\Values\Content #}
{# location \Netgen\EzPlatformSiteApi\API\Values\Location #}
With that, you will get autocompletion and Cmd/Ctrl-click navigation through the Twig code.

**Content on this page:**

.. contents::
Expand Down

0 comments on commit ba9e9b7

Please sign in to comment.