Skip to content

Releases: DivanDesign/EvolutionCMS.snippets.ddRunSnippets

Version 4.2.1

Choose a tag to compare

@Ronef Ronef released this 02 Aug 16:51
  • * Parameters → snippets->{$snippetName}->runParams->cache->suffix: Has been renamed from name (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

Choose a tag to compare

@Ronef Ronef released this 30 Jul 11:14
  • + 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 from docId (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

Choose a tag to compare

@Ronef Ronef released this 14 Apr 11:33
  • * 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

Choose a tag to compare

@Ronef Ronef released this 03 May 22:28
  • + Parameters → snippets->{$snippetName}->runParams->cache:
  • + 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 from snippets_parseResults (with backward compatibility).
  • * Attention! PHP >= 7.4 is required.

Version 4.0

Choose a tag to compare

@Ronef Ronef released this 30 Mar 00:43
  • * 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).
    • - outputterParams->placeholders: The outdated parameter name placeholders is no longer supported.
  • * 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

Choose a tag to compare

@Ronef Ronef released this 30 Apr 08:05
  • + 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

Choose a tag to compare

@Ronef Ronef released this 29 Apr 17:38
  • * 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

Choose a tag to compare

@Ronef Ronef released this 03 Jun 10:20
  • * 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

Choose a tag to compare

@Ronef Ronef released this 21 May 20:23
  • * Parameters → tpl_placeholders:
    • * Renamed from placeholders (with backward compatibility).
    • * Truly supports JSON and QueryString.

Version 3.1

Choose a tag to compare

@Ronef Ronef released this 13 May 22:40
  • + Parameters → snippets->{$snippetName}->{$paramName}: As opposed to standard CMS calling you can pass not only string parameters to the snippet, any types are supported.