TypoScript Plugin 2.3.0

TypoScript Plugin 2.3.0

Fabian Galinski 07. July 2020 Releases

0 Comments // Reading Time: 2 min.

Today we have released version 2.2.0 of our TypoScript Plugin.  This update integrates the Symfony expression syntax for conditions and a GoTo for PHP classes. Many thanks to all who report bugs in our Gitlab issue tracker!

GoTo for PHP classes

This function allows you to jump directly into PHP classes using the key combination CTRL + left click when the path is given. This must be either a key or a value. An example is shown in the code below.

config.tx_extbase {
	persistence {
		classes {
			SGalinski\SgComments\Domain\Model\NotifyMe {
				mapping {
					tableName = SGalinski\SgComments\Domain\Model\NotifyMe
					columns {

					}
				}
			}
		}
	}
}

Compatibility

TYPO3 Versions7.6.X | 8.7.X | 9.5.X | 10.4.X
IDE Versions
from 2018.3 
to min. 2020.1

PhpStorm
WebStorm
IntelliJ IDEA Ultimate
IntelliJ IDEA Community
IntelliJ IDEA Educational

Integration of the Symfony expression syntax for conditions

In the following code example you can see the use of the new syntax. The current features are, an automatic error detection of invalid use of this syntax and an optimized look by improving the colors used for a faster overview.

   [page["uid"] in 18..45]
   # This condition matches if current page uid is between 18 and 45
   [END]

   [frontend.user.userId in [1,5,7]]
   # This condition matches if current logged in frontend user has the uid 1, 5 or 7
   [END]

   [not ("foo" matches "/bar/")]
   # This condition does match if "foo" **not** matches the regExp: `/bar/`
   [END]

   [applicationContext == "Production" && userId == 15]
   # This condition matches if application context is "Production" AND logged in user has the uid 15
   # Note that the old syntax with two blocks combined with && is deprecated
   # and will not work in v10:
   # [applicationContext == "Production"] && [userId == 15]
   [END]

   [request.getNormalizedParams().getHttpHost() == 'typo3.org']
   # This condition matches if current hostname is typo3.org
   [END]

   [like(request.getNormalizedParams().getHttpHost(), "*.devbox.local")]
   # This condition matches if current hostname is any subdomain of devbox.local
   [END]

   [request.getNormalizedParams().isHttps() == false]
   # This condition matches if current request is **not** https
   [END]

   [request.getPageArguments().get('foo_id') > 0]
   # This condition matches if the GET parameter foo_id is greater than 0.
   # getPageArguments() contains resolved route parts from enhancers which
   # request.getQueryParams() does not contain.
   [END]

   [traverse(request.getQueryParams(), 'tx_news_pi1/news') > 0]
   # This condition matches if current query parameters have tx_news_pi[news] set to a value greater than zero
   [END]

Comments

No comments.
    Drop files here