From 2ad6e9fbc27dc102fd1a76b1b4d35c11ae6616f6 Mon Sep 17 00:00:00 2001 From: Ilyas Ronef Date: Fri, 2 Feb 2018 13:19:20 +0500 Subject: [PATCH] =?UTF-8?q?*=20The=20following=20parameters=20have=20been?= =?UTF-8?q?=20renamed=20(the=20snippet=20works=20with=20the=20old=20names?= =?UTF-8?q?=20but=20they=20are=20deprecated):=20=09*=20=E2=80=9CdocField?= =?UTF-8?q?=E2=80=9D=20=E2=86=92=20=E2=80=9CgeoPos=5FdocField=E2=80=9D.=20?= =?UTF-8?q?=09*=20=E2=80=9CdocId=E2=80=9D=20=E2=86=92=20=E2=80=9CgeoPos=5F?= =?UTF-8?q?docId=E2=80=9D.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ddYMap.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ddYMap.php b/ddYMap.php index 8e0dc72..10dda8f 100644 --- a/ddYMap.php +++ b/ddYMap.php @@ -9,11 +9,11 @@ * @uses MODXEvo.libraries.ddTools >= 0.21 {@link http://code.divandesign.biz/modx/ddtools }. * * @note Attention! The jQuery library should be included on the page. - * @note From the pair of “$geoPos” / “$docField” parameters one is required. + * @note From the pair of “$geoPos” / “$geoPos_docField” parameters one is required. * * @param $geoPos {string_commaSeparated} — Comma separated longitude and latitude. @required - * @param $docField {string} — A field name with position that is required to be got. - * @param $docId {integer} — Document ID with a field value needed to be received. Default: current document. + * @param $geoPos_docField {string} — A field name with position that is required to be got. + * @param $geoPos_docId {integer} — Document ID with a field value needed to be received. Default: current document. * @param $mapElement {string} — Container selector which the map is required to be embed in. Default: '#map'. * @param $defaultType {'map'|'satellite'|'hybrid'|'publicMap'|'publicMapHybrid'} — Default map type: 'map' — schematic map, 'satellite' — satellite map, 'hybrid' — hybrid map, 'publicMap' — public map, 'publicMapHybrid' - hybrid public map. Default: 'map'. * @param $defaultZoom {integer} — Default map zoom. Default: 15. @@ -34,17 +34,17 @@ //Backward compatibility extract(ddTools::verifyRenamedParams($params, [ - 'docField' => 'getField', - 'docId' => 'getId' + 'geoPos_docField' => ['docField', 'getField'], + 'geoPos_docId' => ['docId', 'getId'] ])); //Если задано имя поля, которое необходимо получить -if (isset($docField)){ +if (isset($geoPos_docField)){ $geoPos = ddTools::getTemplateVarOutput( - [$docField], - $docId + [$geoPos_docField], + $geoPos_docId ); - $geoPos = $geoPos[$docField]; + $geoPos = $geoPos[$geoPos_docField]; } //Где должны быть подключены скрипты