Releases: DivanDesign/EvolutionCMS.snippets.ddRunSnippets
Releases · DivanDesign/EvolutionCMS.snippets.ddRunSnippets
Version 4.2.1
- * Parameters →
snippets->{$snippetName}->runParams->cache->suffix
: Has been renamed fromname
(with backward compatibility). - -
\ddRunSnippets\Cache
: The class has been removed,\DDTools\Tools\Cache
is used instead. - * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.63 is required.
Version 4.2
- + Parameters →
snippets->{$snippetName}->runParams->cache
:- +
prefix
: The new optional parameter. Allows you to set a custom cache file prefix. Useful if you want to cache some custom data that is not related to any documents. - *
resourceId
: Has been renamed fromdocId
(with backward compatibility).
- +
- *
\ddRunSnippets\Cache::clearCache
→ Parameters:- * Fixed a bug, previously parameters were not used and the all cache was cleared regardless of what was passed.
- * Fixed incorrect declaration of optional parameters.
- * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.62 is required.
Version 4.1.1
- * Parameters →
outputterParams->tpl
: Snippet placeholders will be replaced even with empty results. - *
\ddTools::getTpl
is used instead of$modx->getTpl
(means a bit less bugs). - * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.60 is required.
Version 4.1
- + Parameters →
snippets->{$snippetName}->runParams->cache
:- + The new group of parameters. Allows to cache a snippet result to a specific file (see README).
- + Created cache files will be automatically deleted by (MODX)EvolutionCMS.plugins.ddRunSnippets.
- + Parameters →
snippets->{$snippetName}->runParams->parseResultCompletely
: The new parameter. Allows to completely parse result of required snippet by CMS parser. - * Parameters →
snippets_parseEachResultCompletely
: Has been renamed fromsnippets_parseResults
(with backward compatibility). - * Attention! PHP >= 7.4 is required.
Version 4.0
- * Attention! Backward compatibility is broken.
- * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.59 is required.
- *
\DDTools\Snippet::runSnippet
is used instead of$modx->runSnippet
to run snippets without DB and eval. This increases performance and saves server resources, but unfortunately you can't run snippets that do not use\DDTools\Snippet
. Please give us feedback via Telegram chat if this is critical. - + Any executed snippet can return either a string or a native PHP array. It is convenient to use with “nested” placeholders (see README → Examples).
- * Parameters →
outputterParams
:- * The following parameters have been renamed (with backward compatibility):
- *
tpl
→outputterParams->tpl
. - *
tpl_placeholders
→outputterParams->placeholders
.
- *
- *
outputterParams->tpl
:- + Placeholders →
[+ddRunSnippetsResult.all+]
: The new placeholder. Contains results of all executed snippets combined by''
. - * Default value: Has been changed to
''
(all snippets will be executed but nothing will be returned).
- + Placeholders →
- -
outputterParams->placeholders
: The outdated parameter nameplaceholders
is no longer supported.
- * The following parameters have been renamed (with backward compatibility):
- * README:
- + Parameters description: Additional subheadings have been added.
- * Examples:
- + Some additional comments have been added.
- * HJSON is used for all examples.
- + Links → GitHub.
Version 3.4
- + Conversion to JSON and back is not used for nested objects anymore, recursion is used instead. So, you don't have to care about correct JSON format in result of each snippet when placeholders are used in object-values of parameters in any depth.
Version 3.3
- * Attention! PHP >= 5.6 is required.
- * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.49.1 is required.
- + Parameters:
- +
snippets_parseResults
: The new parameter. Adds the ability to parse result of each snippet by CMS parser. - +
snippets
,tpl_placeholders
: Can also be set as HJSON or as a native PHP object or array (e. g. for calls through$modx->runSnippet
).
- +
- + You can just call
\DDTools\Snippet::runSnippet
to run the snippet without DB and eval (see README → Examples). - +
\ddRunSnippets\Snippet
: The new class. All snippet code was moved here. - + README:
- + Documentation → Installation → Using (MODX)EvolutionCMS.libraries.ddInstaller.
- + Links.
- + Composer.json →
support
.
Version 3.2
- * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.38.1 is required.
- + Parameters →
snippets->{$snippetName}->{$paramName}
: Placeholders of previous snippet executions results also works in object-values of parameters in any depth. - * Refactoring.
- + README → Documentation → Examples → Pass objects and arrays as snippet params.
Version 3.1.1
- * Parameters →
tpl_placeholders
:- * Renamed from
placeholders
(with backward compatibility). - * Truly supports JSON and QueryString.
- * Renamed from
Version 3.1
- + Parameters →
snippets->{$snippetName}->{$paramName}
: As opposed to standard CMS calling you can pass not only string parameters to the snippet, any types are supported.