[FEATURE] Add TypoScript condition for ApplicationContext 12/22412/13
authorSteffen Müller <typo3@t3node.com>
Thu, 18 Jul 2013 23:10:21 +0000 (01:10 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Fri, 11 Oct 2013 12:04:27 +0000 (14:04 +0200)
commit113655bef7072557d05eb40b1c2bdb105a26f44c
treec7d0ff7e554a5281cd9e654ae9f8ed85abe7d3b5
parent28f2f31df93f10a0b43338e4f9797e273acdb077
[FEATURE] Add TypoScript condition for ApplicationContext

The following condition is available in TypoScript and TSconfig
for testing the ApplicationContext:

[applicationContext = value1, value2, ...]

One of the given values matching the applicationContext.
Wildcards + and * are allowed, as well as regular expressions
delimited with /PREG_PATTERN/

Examples:

[applicationContext = Development/Debugging, Development/Profiling]
  # matching exactly "Development/Debugging" or "Development/Profiling"
[global]

[applicationContext = Production*]
  # matching any applicationContext with a rootContext of "Production",
  # for example "Production/Live" or "Production/Staging"
[global]

[applicationContext = /^Production\/Staging\/Server\d+$/]
  # matching "Production/Staging/Server1", "Production/Staging/Server2"
  # and so on
[global]

Resolves: #50132
Documentation: #52701
Releases: 6.2
Change-Id: I4f0f69ca4208d36d8eb8966ec9ef034f6b703b34
Reviewed-on: https://review.typo3.org/22412
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php
typo3/sysext/core/Tests/Unit/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcherTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/TypoScript/ConditionMatching/Fixtures/GeneralUtilityFixture.php [new file with mode: 0644]