@@ -5,24 +5,24 @@ discard block |
||
| 5 | 5 | * @license GNU General Public License (GPL), http://www.gnu.org/copyleft/gpl.html |
| 6 | 6 | * @author Agel_Nash <[email protected]> |
| 7 | 7 | */ |
| 8 | -if (!defined('MODX_BASE_PATH')) { |
|
| 8 | +if ( ! defined('MODX_BASE_PATH')) { |
|
| 9 | 9 | die('HACK???'); |
| 10 | 10 | } |
| 11 | 11 | $_out = ''; |
| 12 | 12 | |
| 13 | -if ( isset( $modx->event->params['config'] ) ) { |
|
| 13 | +if (isset($modx->event->params['config'])) { |
|
| 14 | 14 | require_once MODX_BASE_PATH . 'assets/lib/Helpers/Config.php'; |
| 15 | 15 | |
| 16 | - $helper = new \Helpers\Config( $modx->event->params ); |
|
| 17 | - $helper->setPath( '/assets/snippets/DocLister/' ); |
|
| 18 | - $helper->loadConfig( $modx->event->params['config'] ); |
|
| 16 | + $helper = new \Helpers\Config($modx->event->params); |
|
| 17 | + $helper->setPath('/assets/snippets/DocLister/'); |
|
| 18 | + $helper->loadConfig($modx->event->params['config']); |
|
| 19 | 19 | |
| 20 | - $modx->event->params = array_merge( $helper->getConfig(), $modx->event->params ); |
|
| 21 | - extract( $modx->event->params ); |
|
| 20 | + $modx->event->params = array_merge($helper->getConfig(), $modx->event->params); |
|
| 21 | + extract($modx->event->params); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | $_parents = array(); |
| 25 | -$hideMain = (!isset($hideMain) || (int)$hideMain == 0); |
|
| 25 | +$hideMain = ( ! isset($hideMain) || (int)$hideMain == 0); |
|
| 26 | 26 | if ($hideMain) { |
| 27 | 27 | $_parents[] = $modx->config['site_start']; |
| 28 | 28 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $tmp = $modx->getParentIds($id); |
| 31 | 31 | $_parents = array_merge($_parents, array_reverse(array_values($tmp))); |
| 32 | 32 | foreach ($_parents as $i => $num) { |
| 33 | - if ($num == $modx->config['site_start'] && !$hideMain) { |
|
| 33 | + if ($num == $modx->config['site_start'] && ! $hideMain) { |
|
| 34 | 34 | unset($_parents[$i]); |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -38,12 +38,12 @@ discard block |
||
| 38 | 38 | if (isset($showCurrent) && (int)$showCurrent > 0) { |
| 39 | 39 | $_parents[] = $id; |
| 40 | 40 | } |
| 41 | -if (!empty($_parents) && count($_parents) >= (empty($minDocs) ? 0 : (int)$minDocs)) { |
|
| 41 | +if ( ! empty($_parents) && count($_parents) >= (empty($minDocs) ? 0 : (int)$minDocs)) { |
|
| 42 | 42 | $_options = array_merge( |
| 43 | 43 | array( |
| 44 | 44 | 'config' => 'crumbs:core' |
| 45 | 45 | ), |
| 46 | - !empty($modx->event->params) ? $modx->event->params : array(), |
|
| 46 | + ! empty($modx->event->params) ? $modx->event->params : array(), |
|
| 47 | 47 | array( |
| 48 | 48 | 'idType' => 'documents', |
| 49 | 49 | 'sortType' => 'doclist', |
@@ -11,14 +11,14 @@ discard block |
||
| 11 | 11 | $p = array(); |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | -if ( isset( $p['config'] ) ) { |
|
| 14 | +if (isset($p['config'])) { |
|
| 15 | 15 | require_once MODX_BASE_PATH . 'assets/lib/Helpers/Config.php'; |
| 16 | 16 | |
| 17 | - $helper = new \Helpers\Config( $p ); |
|
| 18 | - $helper->setPath( '/assets/snippets/DocLister/' ); |
|
| 19 | - $helper->loadConfig( $p['config'] ); |
|
| 17 | + $helper = new \Helpers\Config($p); |
|
| 18 | + $helper->setPath('/assets/snippets/DocLister/'); |
|
| 19 | + $helper->loadConfig($p['config']); |
|
| 20 | 20 | |
| 21 | - $p = array_merge( $helper->getConfig(), $p ); |
|
| 21 | + $p = array_merge($helper->getConfig(), $p); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /** Текущий уровень вложенности */ |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | |
| 79 | 79 | $p['tvList'] = $currentTvList = \APIhelpers::getkey($p, 'tvList'); |
| 80 | -$currentTvList = \APIhelpers::getkey($p, 'tvList' . $currentDepth, $currentTvList); |
|
| 80 | +$currentTvList = \APIhelpers::getkey($p, 'tvList' . $currentDepth, $currentTvList); |
|
| 81 | 81 | /** |
| 82 | 82 | * Получение prepare сниппетов из параметров BeforePrepare и AfterPrepare |
| 83 | 83 | * для совмещения с обязательным вызовом DLFixedPrepare::buildMenu метода |