From b97445ed7a1bc941b9147e529372c7cdb6afe9e9 Mon Sep 17 00:00:00 2001 From: Ilyas Ronef Date: Thu, 30 Apr 2020 19:09:02 +0300 Subject: [PATCH 1/9] * Minor changes. --- composer.json | 4 ++-- ddGetDocuments_snippet.php | 2 +- src/DataProvider/Customdbtable/DataProvider.php | 3 +-- src/DataProvider/DataProviderOutput.php | 3 +-- src/DataProvider/Parent/DataProvider.php | 3 +-- src/DataProvider/Select/DataProvider.php | 3 +-- src/Extender/Pagination/Extender.php | 3 +-- src/Extender/Search/Extender.php | 3 +-- src/Extender/Tagging/Extender.php | 3 +-- src/Outputter/Json/Outputter.php | 7 ++++--- src/Outputter/Sitemap/Outputter.php | 8 ++++---- src/Outputter/String/Outputter.php | 3 +-- src/Outputter/Yandexmarket/Outputter.php | 3 +-- 13 files changed, 20 insertions(+), 28 deletions(-) diff --git a/composer.json b/composer.json index 84c606d..55bbef0 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,8 @@ "license": "MIT", "require": { "php": ">=5.4.0", - "dd/modxevo-library-ddtools": ">=0.30", - "composer/installers": "~1.0" + "dd/modxevo-library-ddtools": ">=0.30.0", + "composer/installers": "~1.0.0" }, "autoload": { "psr-4": { diff --git a/ddGetDocuments_snippet.php b/ddGetDocuments_snippet.php index f6ddb6e..9297f92 100644 --- a/ddGetDocuments_snippet.php +++ b/ddGetDocuments_snippet.php @@ -7,7 +7,7 @@ * * @link https://code.divandesign.biz/modx/ddgetdocuments * - * @copyright 2015–2020 DivanDesign {@link http://www.DivanDesign.biz } + * @copyright 2015–2020 DD Group {@link http://www.DivanDesign.biz } */ //The snippet must return an empty string even if result is absent diff --git a/src/DataProvider/Customdbtable/DataProvider.php b/src/DataProvider/Customdbtable/DataProvider.php index 28b6371..8c503d3 100644 --- a/src/DataProvider/Customdbtable/DataProvider.php +++ b/src/DataProvider/Customdbtable/DataProvider.php @@ -2,8 +2,7 @@ namespace ddGetDocuments\DataProvider\Customdbtable; -class DataProvider extends \ddGetDocuments\DataProvider\DataProvider -{ +class DataProvider extends \ddGetDocuments\DataProvider\DataProvider { protected $resourcesTableName = '' ; diff --git a/src/DataProvider/DataProviderOutput.php b/src/DataProvider/DataProviderOutput.php index 78d3c34..3c34f04 100644 --- a/src/DataProvider/DataProviderOutput.php +++ b/src/DataProvider/DataProviderOutput.php @@ -2,8 +2,7 @@ namespace ddGetDocuments\DataProvider; -class DataProviderOutput -{ +class DataProviderOutput { public $items, $totalFound diff --git a/src/DataProvider/Parent/DataProvider.php b/src/DataProvider/Parent/DataProvider.php index 80a8179..d085bfc 100644 --- a/src/DataProvider/Parent/DataProvider.php +++ b/src/DataProvider/Parent/DataProvider.php @@ -2,8 +2,7 @@ namespace ddGetDocuments\DataProvider\Parent; -class DataProvider extends \ddGetDocuments\DataProvider\DataProvider -{ +class DataProvider extends \ddGetDocuments\DataProvider\DataProvider { protected $filter = '`published` = 1 AND `deleted` = 0', diff --git a/src/DataProvider/Select/DataProvider.php b/src/DataProvider/Select/DataProvider.php index e933d86..921f5bc 100644 --- a/src/DataProvider/Select/DataProvider.php +++ b/src/DataProvider/Select/DataProvider.php @@ -2,8 +2,7 @@ namespace ddGetDocuments\DataProvider\Select; -class DataProvider extends \ddGetDocuments\DataProvider\DataProvider -{ +class DataProvider extends \ddGetDocuments\DataProvider\DataProvider { protected $filter = null, diff --git a/src/Extender/Pagination/Extender.php b/src/Extender/Pagination/Extender.php index 48d29b4..1241432 100644 --- a/src/Extender/Pagination/Extender.php +++ b/src/Extender/Pagination/Extender.php @@ -4,8 +4,7 @@ use ddGetDocuments\DataProvider\DataProviderOutput; -class Extender extends \ddGetDocuments\Extender\Extender -{ +class Extender extends \ddGetDocuments\Extender\Extender { private /** * @property $snippetParams {stdClass} diff --git a/src/Extender/Search/Extender.php b/src/Extender/Search/Extender.php index 6e6dfeb..37640f5 100644 --- a/src/Extender/Search/Extender.php +++ b/src/Extender/Search/Extender.php @@ -4,8 +4,7 @@ use ddGetDocuments\DataProvider\DataProviderOutput; -class Extender extends \ddGetDocuments\Extender\Extender -{ +class Extender extends \ddGetDocuments\Extender\Extender { private $currentQuery = '' ; diff --git a/src/Extender/Tagging/Extender.php b/src/Extender/Tagging/Extender.php index 66ae1cf..551fd93 100644 --- a/src/Extender/Tagging/Extender.php +++ b/src/Extender/Tagging/Extender.php @@ -4,8 +4,7 @@ use ddGetDocuments\DataProvider\DataProviderOutput; -class Extender extends \ddGetDocuments\Extender\Extender -{ +class Extender extends \ddGetDocuments\Extender\Extender { private //Current selected tags $currentTags = [] diff --git a/src/Outputter/Json/Outputter.php b/src/Outputter/Json/Outputter.php index be9bb88..f823f7f 100644 --- a/src/Outputter/Json/Outputter.php +++ b/src/Outputter/Json/Outputter.php @@ -8,11 +8,11 @@ class Outputter extends \ddGetDocuments\Outputter\Outputter { /** * parse - * @version 2.1.2 (2019-03-11) + * @version 2.1.3 (2020-04-30) * * @param $data {Output} * - * @return {string_json_array} + * @return {stringJsonArray} */ public function parse(Output $data){ $result = []; @@ -20,7 +20,8 @@ public function parse(Output $data){ //Пройдемся по полученным данным foreach( $data->provider->items as - $itemIndex => $itemData + $itemIndex => + $itemData ){ $result_item = []; diff --git a/src/Outputter/Sitemap/Outputter.php b/src/Outputter/Sitemap/Outputter.php index eda4c2e..9387ba2 100644 --- a/src/Outputter/Sitemap/Outputter.php +++ b/src/Outputter/Sitemap/Outputter.php @@ -4,8 +4,7 @@ use ddGetDocuments\Output; -class Outputter extends \ddGetDocuments\Outputter\Outputter -{ +class Outputter extends \ddGetDocuments\Outputter\Outputter { protected $priorityTVName = 'general_seo_sitemap_priority', $changefreqTVName = 'general_seo_sitemap_changefreq', @@ -56,7 +55,7 @@ function __construct($params = []){ /** * parse - * @version 1.1.1 (2019-03-19) + * @version 1.1.2 (2020-04-30) * * @param $data {Output} * @@ -65,7 +64,8 @@ function __construct($params = []){ public function parse(Output $data){ foreach ( $data->provider->items as - $docIndex => $docData + $docIndex => + $docData ){ //Convert date to appropriate format if (isset($data->provider->items[$docIndex]['editedon'])){ diff --git a/src/Outputter/String/Outputter.php b/src/Outputter/String/Outputter.php index 8f9fb4f..eb48c46 100644 --- a/src/Outputter/String/Outputter.php +++ b/src/Outputter/String/Outputter.php @@ -4,8 +4,7 @@ use ddGetDocuments\Output; -class Outputter extends \ddGetDocuments\Outputter\Outputter -{ +class Outputter extends \ddGetDocuments\Outputter\Outputter { public $placeholders = [] ; diff --git a/src/Outputter/Yandexmarket/Outputter.php b/src/Outputter/Yandexmarket/Outputter.php index 51abfbd..6ea556e 100644 --- a/src/Outputter/Yandexmarket/Outputter.php +++ b/src/Outputter/Yandexmarket/Outputter.php @@ -4,8 +4,7 @@ use ddGetDocuments\Output; -class Outputter extends \ddGetDocuments\Outputter\Outputter -{ +class Outputter extends \ddGetDocuments\Outputter\Outputter { protected /** * @property $templates {stdClass} From 7424bd3e22c810418c851fb27aae5fca3010ece5 Mon Sep 17 00:00:00 2001 From: Ilyas Ronef Date: Thu, 30 Apr 2020 19:11:26 +0300 Subject: [PATCH 2/9] + README, CHAGNELOG: Style improvements. --- CHANGELOG.md | 1 + README.md | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6be055..f73d88a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,4 +26,5 @@ * \+ The first release. + \ No newline at end of file diff --git a/README.md b/README.md index 5f628cd..5a4f321 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ A snippet for fetching and parsing resources from the document tree or custom DB ## Requires + * PHP >= 5.4 * MySQL >= 8 or MariaDB >= 10.3.10 (not tested in older versions). * [(MODX)EvolutionCMS](https://github.com/evolution-cms/evolution) >= 1.1 @@ -698,4 +699,7 @@ Output in [YML format](https://yandex.ru/support/partnermarket/export/yml.html). * **Required** -## [Home page →](https://code.divandesign.biz/modx/ddgetdocuments) \ No newline at end of file +## [Home page →](https://code.divandesign.biz/modx/ddgetdocuments) + + + \ No newline at end of file From 73926f0499d97d0aa09ddd93d8435f2f1e437b46 Mon Sep 17 00:00:00 2001 From: Ilyas Ronef Date: Thu, 30 Apr 2020 19:16:56 +0300 Subject: [PATCH 3/9] * Snippet: Small refactoring. --- ddGetDocuments_snippet.php | 41 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/ddGetDocuments_snippet.php b/ddGetDocuments_snippet.php index 9297f92..36ee404 100644 --- a/ddGetDocuments_snippet.php +++ b/ddGetDocuments_snippet.php @@ -19,11 +19,16 @@ $modx->getConfig('base_path') . 'assets/snippets/ddGetDocuments/' ; +$snippetPath_src = + $snippetPath . + 'src' . + DIRECTORY_SEPARATOR +; //Include (MODX)EvolutionCMS.libraries.ddTools if(!class_exists('\ddTools')){ require_once( - $modx->config['base_path'] . + $modx->getConfig('base_path') . 'assets/libs/ddTools/modx.ddtools.class.php' ); } @@ -77,7 +82,7 @@ $provider : 'parent' ; -$providerClass = \ddGetDocuments\DataProvider\DataProvider::includeProviderByName($provider); +$dataProviderClass = \ddGetDocuments\DataProvider\DataProvider::includeProviderByName($provider); $providerParams = isset($providerParams) ? $providerParams : @@ -114,7 +119,7 @@ '' ; -if(class_exists($providerClass)){ +if(class_exists($dataProviderClass)){ //Prepare provider params $providerParams = \ddTools::encodedStringToArray($providerParams); //Prepare extender params @@ -176,35 +181,31 @@ $extenders as $extenderName ){ - $extender = \ddGetDocuments\Extender\Extender::createChildInstance([ + $extenderObject = \ddGetDocuments\Extender\Extender::createChildInstance([ 'name' => $extenderName, 'parentDir' => - $snippetPath . - 'src' . - DIRECTORY_SEPARATOR . + $snippetPath_src . 'Extender' , //Passing parameters into constructor 'params' => $input->extendersParams->{$extenderName} ]); //Passing a link to the storage - $extendersStorage[$extenderName] = $extender; + $extendersStorage[$extenderName] = $extenderObject; //Overwrite the snippet parameters with the result of applying them to the current extender - $input->snippetParams = $extender->applyToSnippetParams($input->snippetParams); + $input->snippetParams = $extenderObject->applyToSnippetParams($input->snippetParams); } - $dataProvider = new $providerClass($input); + $dataProviderObject = new $dataProviderClass($input); if ($outputter != 'raw'){ - $input->outputterParams->dataProvider = $dataProvider; + $input->outputterParams->dataProvider = $dataProviderObject; $outputterObject = \ddGetDocuments\Outputter\Outputter::createChildInstance([ 'name' => $outputter, 'parentDir' => - $snippetPath . - 'src' . - DIRECTORY_SEPARATOR . + $snippetPath_src . 'Outputter' , //Passing parameters into constructor @@ -212,23 +213,23 @@ ]); } - $providerResult = $dataProvider->get(); + $dataProviderResult = $dataProviderObject->get(); - $data = new \ddGetDocuments\Output($providerResult); + $outputData = new \ddGetDocuments\Output($dataProviderResult); //Iterate through all extenders again to apply them to the output foreach( $extendersStorage as $extenderName => - $extender + $extenderObject ){ - $data->extenders[$extenderName] = $extender->applyToOutput($providerResult); + $outputData->extenders[$extenderName] = $extenderObject->applyToOutput($dataProviderResult); } if ($outputter == 'raw'){ - $snippetResult = $data; + $snippetResult = $outputData; }else{ - $snippetResult = $outputterObject->parse($data); + $snippetResult = $outputterObject->parse($outputData); } } From e6290ce26c8f0b35c9f09a57992728d6c646cbce Mon Sep 17 00:00:00 2001 From: Ilyas Ronef Date: Fri, 8 May 2020 14:26:28 +0300 Subject: [PATCH 4/9] =?UTF-8?q?*=20Composer.json:=20=09+=20`homepage`.=20?= =?UTF-8?q?=09+=20`authors`.=20=09*=20`name`:=20Renamed=20as=20`evolutionc?= =?UTF-8?q?ms-snippets-ddgetdocuments`=20from=20`dd/modxevo-snippet-ddgetd?= =?UTF-8?q?ocuments`.=20=09*=20`require`:=E2=86=92=20`dd/evolutioncms-libr?= =?UTF-8?q?aries-ddtools`:=20Renamed=20from=20`dd/modxevo-library-ddtools`?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 55bbef0..28ef8d9 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "dd/modxevo-snippet-ddgetdocuments", + "name": "dd/evolutioncms-snippets-ddgetdocuments", "type": "modxevo-snippet", "version": "1.0.0", "description": "A snippet for fetching and parsing resources from the document tree or custom DB table by a custom rule.", @@ -17,10 +17,25 @@ "get documents", "ddgetdocuments" ], + "homepage": "https://code.divandesign.biz/modx/ddgetdocuments", + "authors": [ + { + "name": "DD Group", + "email": "code@DivanDesign.biz", + "homepage": "https://code.divandesign.biz", + "role": "Owner" + }, + { + "name": "Ilyas Ronef", + "email": "ilyas@DivanDesign.ru", + "homepage": "https://ronef.ru", + "role": "Developer" + } + ], "license": "MIT", "require": { "php": ">=5.4.0", - "dd/modxevo-library-ddtools": ">=0.30.0", + "dd/evolutioncms-libraries-ddtools": ">=0.30.0", "composer/installers": "~1.0.0" }, "autoload": { From deb12d8d09729bebee0fdd9a46382104ba09321a Mon Sep 17 00:00:00 2001 From: alexey Date: Wed, 20 May 2020 22:21:38 +0300 Subject: [PATCH 5/9] ddGetDocuments\DataProvider\DataProvider::prepareQueryData: TVs default values were missed. (#6) --- src/DataProvider/DataProvider.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/DataProvider/DataProvider.php b/src/DataProvider/DataProvider.php index df9adb0..55a554e 100644 --- a/src/DataProvider/DataProvider.php +++ b/src/DataProvider/DataProvider.php @@ -30,7 +30,7 @@ abstract class DataProvider extends \DDTools\BaseClass { */ private $getResourcesDataFromDb_tvsSQL = 'JSON_OBJECTAGG( `tvName`.`name`, - `tvValue`.`value` + coalesce(`tvValue`.`value`, `tvName`.`default_text`) )'; /** @@ -132,7 +132,7 @@ function __construct(\ddGetDocuments\Input $input){ LEADING "{" FROM TRIM( TRAILING "}" FROM JSON_OBJECT( `tvName`.`name`, - `tvValue`.`value` + coalesce(`tvValue`.`value`, `tvName`.`default_text`) ) ) ) @@ -627,11 +627,15 @@ protected function prepareQuery($params = []){ SELECT ' . $this->getResourcesDataFromDb_tvsSQL . ' FROM - ' . \ddTools::$tables['site_tmplvar_contentvalues'] . ' as `tvValue`, - ' . \ddTools::$tables['site_tmplvars'] . ' as `tvName` + ' . \ddTools::$tables['site_content'] . ' as `content` LEFT JOIN + ' . \ddTools::$tables['site_tmplvar_templates'] . ' as `resTvTemplates` ON + `content`.`template` = `resTvTemplates`.`templateid` LEFT JOIN + ' . \ddTools::$tables['site_tmplvars'] . ' as `tvName` ON + `resTvTemplates`.`tmplvarid` = `tvName`.`id` LEFT JOIN + ' . \ddTools::$tables['site_tmplvar_contentvalues'] . ' as `tvValue` ON + `content`.`id` = `tvValue`.`contentid` AND `tvName`.`id` = `tvValue`.`tmplvarid` WHERE - `tvName`.`id` = `tvValue`.`tmplvarid` AND - `resources`.`id` = `tvValue`.`contentid` + `resources`.`id` = `content`.`id` ) as `TVs` '; } From 3c3ef7a98a26a6ea68af60b20dc32f84d4624925 Mon Sep 17 00:00:00 2001 From: Ilyas Ronef Date: Mon, 8 Jun 2020 15:29:55 +0300 Subject: [PATCH 6/9] * `\ddGetDocuments\Outputter\Json\Outputter::parse`: Removed unused variable. --- src/Outputter/Json/Outputter.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Outputter/Json/Outputter.php b/src/Outputter/Json/Outputter.php index f823f7f..7fd8015 100644 --- a/src/Outputter/Json/Outputter.php +++ b/src/Outputter/Json/Outputter.php @@ -8,7 +8,7 @@ class Outputter extends \ddGetDocuments\Outputter\Outputter { /** * parse - * @version 2.1.3 (2020-04-30) + * @version 2.1.4 (2020-06-08) * * @param $data {Output} * @@ -20,7 +20,6 @@ public function parse(Output $data){ //Пройдемся по полученным данным foreach( $data->provider->items as - $itemIndex => $itemData ){ $result_item = []; From 2a5afa18090e87c0a0d44c2c0c2a37b47f5934fa Mon Sep 17 00:00:00 2001 From: Ilyas Ronef Date: Mon, 22 Jun 2020 12:52:36 +0300 Subject: [PATCH 7/9] + `extendersParams->pagination->wrapperTpl`: The new placeholder `[+totalPages+]`. --- README.md | 1 + src/Extender/Pagination/Extender.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a4f321..5a55011 100644 --- a/README.md +++ b/README.md @@ -569,6 +569,7 @@ Output in [YML format](https://yandex.ru/support/partnermarket/export/yml.html). * `[+previous+]` — HTML code of navigation block to the previous page (see parameters description below). * `[+next+]` — HTML code of navigation block to the next page (see parameters description below). * `[+pages+]` — HTML code of pages navigalion block (see parameters description below). + * `[+totalPages+]` — Total number of pages. * Valid values: * `stringChunkName` * `string` — use inline templates starting with `@CODE:` diff --git a/src/Extender/Pagination/Extender.php b/src/Extender/Pagination/Extender.php index 1241432..eae7086 100644 --- a/src/Extender/Pagination/Extender.php +++ b/src/Extender/Pagination/Extender.php @@ -112,7 +112,7 @@ public function applyToSnippetParams($snippetParams){ /** * applyToOutput - * @version 1.1.9 (2020-03-11) + * @version 1.2 (2020-06-22) * * @param $dataProviderOutput {\ddGetDocuments\DataProvider\DataProviderOutput} * @@ -236,7 +236,8 @@ public function applyToOutput(DataProviderOutput $dataProviderOutput){ , 'totalPages' => $pagesTotal ] - ])) + ])), + 'totalPages' => $pagesTotal ] ])); } From 52c0d8bf3ae02ebac76e634bb379ef4f49957e10 Mon Sep 17 00:00:00 2001 From: Ilyas Ronef Date: Mon, 22 Jun 2020 17:55:59 +0300 Subject: [PATCH 8/9] * Improved compatibility with new versions of (MODX)EvolutionCMS.libraries.ddTools. * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.40.1 is required (not tested in older versions). --- README.md | 2 +- composer.json | 2 +- ddGetDocuments_snippet.php | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5a55011..f4e79e2 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A snippet for fetching and parsing resources from the document tree or custom DB * PHP >= 5.4 * MySQL >= 8 or MariaDB >= 10.3.10 (not tested in older versions). * [(MODX)EvolutionCMS](https://github.com/evolution-cms/evolution) >= 1.1 -* [(MODX)EvolutionCMS.libraries.ddTools](https://code.divandesign.biz/modx/ddtools) >= 0.30 +* [(MODX)EvolutionCMS.libraries.ddTools](https://code.divandesign.biz/modx/ddtools) >= 0.40.1 ## Documentation diff --git a/composer.json b/composer.json index 28ef8d9..dce2756 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "license": "MIT", "require": { "php": ">=5.4.0", - "dd/evolutioncms-libraries-ddtools": ">=0.30.0", + "dd/evolutioncms-libraries-ddtools": ">=0.40.1", "composer/installers": "~1.0.0" }, "autoload": { diff --git a/ddGetDocuments_snippet.php b/ddGetDocuments_snippet.php index 36ee404..0d4988a 100644 --- a/ddGetDocuments_snippet.php +++ b/ddGetDocuments_snippet.php @@ -41,13 +41,13 @@ } //Backward compatibility -extract(\ddTools::verifyRenamedParams( - $params, - [ +extract(\ddTools::verifyRenamedParams([ + 'params' => $params, + 'compliance' => [ 'outputter' => 'outputFormat', 'outputterParams' => 'outputFormatParams' ] -)); +])); //General $total = From 3d56f212f785ac1a8a2e11f3d6fe1141112097b8 Mon Sep 17 00:00:00 2001 From: Ilyas Ronef Date: Sun, 5 Jul 2020 22:49:54 +0300 Subject: [PATCH 9/9] Prerelease --- CHANGELOG.md | 16 ++++++++++++++++ README.md | 2 +- composer.json | 2 +- ddGetDocuments_snippet.php | 2 +- src/DataProvider/DataProvider.php | 4 ++-- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f73d88a..e23cf5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,22 @@ # (MODX)EvolutionCMS.snippets.ddGetDocuments changelog +## Version 1.1 (2020-07-05) +* \* Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.40.1 is required (not tested in older versions). +* \* Improved compatibility with new versions of (MODX)EvolutionCMS.libraries.ddTools. +* \* Snippet: + * \+ `extendersParams->pagination->wrapperTpl`: The new placeholder `[+totalPages+]`. + * \* Small refactoring. +* \* `\ddGetDocuments\DataProvider\DataProvider::prepareQueryData`: TVs default values are used (#6). +* \* `\ddGetDocuments\Outputter\Json\Outputter::parse`: Removed unused variable. +* \+ README, CHAGNELOG: Style improvements. +* \* Composer.json: + * \+ `homepage`. + * \+ `authors`. + * \* `name`: Renamed as `evolutioncms-snippets-ddgetdocuments` from `dd/modxevo-snippet-ddgetdocuments`. + * \* `require`:→ `dd/evolutioncms-libraries-ddtools`: Renamed from `dd/modxevo-library-ddtools`. + + ## Version 1.0 (2020-03-11) * \* Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.30 is required. * \+ Providers → Customdbtable. Get resources from custom DB table. diff --git a/README.md b/README.md index f4e79e2..a480a9b 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ A snippet for fetching and parsing resources from the document tree or custom DB #### 1. Elements → Snippets: Create a new snippet with the following data 1. Snippet name: `ddGetDocuments`. -2. Description: `1.0 A snippet for fetching and parsing resources from the document tree or custom DB table by a custom rule.`. +2. Description: `1.1 A snippet for fetching and parsing resources from the document tree or custom DB table by a custom rule.`. 3. Category: `Core`. 4. Parse DocBlock: `no`. 5. Snippet code (php): Insert content of the `ddGetDocuments_snippet.php` file from the archive. diff --git a/composer.json b/composer.json index dce2756..e32139e 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "dd/evolutioncms-snippets-ddgetdocuments", "type": "modxevo-snippet", - "version": "1.0.0", + "version": "1.1.0", "description": "A snippet for fetching and parsing resources from the document tree or custom DB table by a custom rule.", "keywords": [ "modx", diff --git a/ddGetDocuments_snippet.php b/ddGetDocuments_snippet.php index 0d4988a..dd4492e 100644 --- a/ddGetDocuments_snippet.php +++ b/ddGetDocuments_snippet.php @@ -1,7 +1,7 @@ filter will be used). Default: ''.