Releases: DivanDesign/EvolutionCMS.snippets.ddIf
Releases · DivanDesign/EvolutionCMS.snippets.ddIf
Version 2.3.1
- * Compatibility with PHP < 8.
- * Parameters →
trueChunk
,falseChunk
→ Placeholders: The following have been renamed (outdated names are still supported, but are not recommended):- *
[+snippetParams.operand1+]
→[+ddIfParams.operand1+]
. - *
[+snippetParams.operand2+]
→[+ddIfParams.operand2+]
. - *
[+snippetParams.operator+]
→[+ddIfParams.operator+]
.
- *
Version 2.3
- + Parameters →
operator
→ Valid values →'isIncludes'
: The new valid value. Case-sensitive check ifoperand1
containsoperand2
(see README → Examples). - *
\ddTools::getTpl
is used instead of$modx->getTpl
(means a bit less bugs). - * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.60 is required.
Version 2.2
- + Parameters →
operator
:- + Added the ability to check if
operand1
is just white space (see README). - + Values are case insensitive.
- + Added the ability to check if
- + README → Documentation → Installation → Using (MODX)EvolutionCMS.libraries.ddInstaller.
Version 2.1
- * Attention! PHP >= 5.6 is required.
- * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.49.1 is required.
- + Parameters →
placeholders
: Can also be set as HJSON. - + You can just call
\DDTools\Snippet::runSnippet
to run the snippet without DB and eval (see README → Examples). - +
\ddIf\Snippet
: The new class. All snippet code was moved here. - + Composer.json →
support
.
Version 2.0
- * Attention! Backward compatibility is broken.
- - Parameters →
trueString
,falseString
: The deprecated parameters are no longer supported. - * Parameters →
trueChunk
,falseChunk
: The following available placeholders were renamed:- *
ddIf_operand1
→snippetParams.operand1
. - *
ddIf_operand2
→snippetParams.operand2
. - *
ddIf_operator
→snippetParams.operator
.
- *
- + Snippet result was added to debug log message.
- + Improved style of debug log message.
- * Refactoring:
- * The
$params
variable is used instead of a standalone variable for each parameter. - *
\DDTools\ObjectTools::extend
is used to set parameters defaults.
- * The
- + README → Links → Packagist.
Version 1.7.1
- * Parameters →
operand1
: Improved an empty unparsed placeholder recognition.
Version 1.7
- * Attention! (MODX)Evolution.libraries.ddTools >= 0.40.1 is required (not tested with older versions).
- + Parameters →
placeholders
: Nested arrays are supported too. - + README.
- + README_ru.
- + CHANGELOG.
- + CHANGELOG_ru.
- + Composer.json.
Version 1.6
- + Parameters →
trueChunk
,falseChunk
: Added few placeholders:- +
[+ddIf_operand1+]
— containsoperand1
value. - +
[+ddIf_operand2+]
— containsoperand2
value. - +
[+ddIf_operator+]
— containsoperator
value.
- +
Version 1.5
- + Parameters →
debugTitle
: The new parameter. If you need to debug just set it and watch the System Event log. - + Parameters →
operand1
: If is equal to something like[+somePlaceholder+]
the snippet interpretate it as''
. It's convenient when placeholders were not parsed for any reason.
Version 1.4
- * Attention! PHP >= 5.4 is required.
- * Attention! (MODX)Evolution >= 1.1 is required.
- * Attention! (MODX)Evolution.libraries.ddTools >= 0.18 is required.
- + Parameters →
placeholders
: Added JSON and Query string support. The old format is still supported but deprecated. - + Parameters →
trueChunk
,falseChunk
: Added support of the@CODE:
keyword prefix. - - Parameters →
trueString
,falseString
: Are deprecated (use@CODE:
prefix instead). Backward compatibility is preserved with message to the CMS Event log. - * Small optimization and other changes.