@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | ob_end_clean(); |
| 197 | 197 | |
| 198 | 198 | $cols = []; |
| 199 | - if($actions) { |
|
| 199 | + if ($actions) { |
|
| 200 | 200 | $cols[] = ['label' => $dropdown]; |
| 201 | 201 | } |
| 202 | 202 | $cols['id'] = ['label' => '№', 'sortable' => true]; |
@@ -244,10 +244,10 @@ discard block |
||
| 244 | 244 | $queryParams = []; |
| 245 | 245 | if (empty($params['all'])) { |
| 246 | 246 | if (!empty($params['limit'])) { |
| 247 | - $this->limit = (int)$params['limit']; |
|
| 247 | + $this->limit = (int) $params['limit']; |
|
| 248 | 248 | } |
| 249 | 249 | if (!empty($params['page'])) { |
| 250 | - $this->page = (int)$params['page']; |
|
| 250 | + $this->page = (int) $params['page']; |
|
| 251 | 251 | } |
| 252 | 252 | $queryParams['limit'] = $this->limit; |
| 253 | 253 | $queryParams['start'] = $this->page * $this->limit - $this->limit; |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | } elseif (\App::$cur->name == 'admin' && $colName == 'name') { |
| 493 | 493 | $redirectUrl = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/admin/' . str_replace('\\', '/', get_class($originalItem)); |
| 494 | 494 | return "<a href ='/admin/{$item->genViewLink()}?redirectUrl={$redirectUrl}'>{$item->$colName}</a>"; |
| 495 | - } elseif ($modelName::$cols[$colName]['type'] == 'html' || $modelName::$cols[$colName]['type']=='textarea') { |
|
| 495 | + } elseif ($modelName::$cols[$colName]['type'] == 'html' || $modelName::$cols[$colName]['type'] == 'textarea') { |
|
| 496 | 496 | $uid = \Tools::randomString(); |
| 497 | 497 | $script = "<script>inji.onLoad(function(){ |
| 498 | 498 | var el{$uid}=$('#{$uid}'); |
@@ -557,10 +557,10 @@ discard block |
||
| 557 | 557 | return []; |
| 558 | 558 | } |
| 559 | 559 | if (!empty($params['limit'])) { |
| 560 | - $this->limit = (int)$params['limit']; |
|
| 560 | + $this->limit = (int) $params['limit']; |
|
| 561 | 561 | } |
| 562 | 562 | if (!empty($params['page'])) { |
| 563 | - $this->page = (int)$params['page']; |
|
| 563 | + $this->page = (int) $params['page']; |
|
| 564 | 564 | } |
| 565 | 565 | $queryParams = [ |
| 566 | 566 | 'count' => true |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $inputOptions = $this->options; |
| 28 | 28 | $inputOptions['value'] = $this->value(); |
| 29 | 29 | $inputOptions['disabled'] = $this->readOnly(); |
| 30 | - if(!empty($this->colParams['required'])){ |
|
| 30 | + if (!empty($this->colParams['required'])) { |
|
| 31 | 31 | $inputOptions['required'] = true; |
| 32 | 32 | } |
| 33 | 33 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | $type = !empty($colInfo['colParams']['type']) ? $colInfo['colParams']['type'] : 'string'; |
| 20 | 20 | if ($type != 'dataManager') { |
| 21 | 21 | $table->addRow([ |
| 22 | - str_replace(' ',' ',!empty($modelName::$labels[$colName]) ? $modelName::$labels[$colName] : $colName), |
|
| 22 | + str_replace(' ', ' ', !empty($modelName::$labels[$colName]) ? $modelName::$labels[$colName] : $colName), |
|
| 23 | 23 | \Model::resloveTypeValue($item, $colName, true) |
| 24 | 24 | ]); |
| 25 | 25 | } |
@@ -21,16 +21,16 @@ |
||
| 21 | 21 | zoom: 13 |
| 22 | 22 | }); |
| 23 | 23 | <?php |
| 24 | - if (!empty($options['value'])) { |
|
| 25 | - ?> |
|
| 24 | + if (!empty($options['value'])) { |
|
| 25 | + ?> |
|
| 26 | 26 | myMapCurPin = new ymaps.Placemark(["<?= !empty($options['value']['lat']) ? $options['value']['lat'] : '56.01'; ?>", "<?= !empty($options['value']['lng']) ? $options['value']['lng'] : '92.85'; ?>"], |
| 27 | 27 | {iconContent: "<?= !empty($options['value']['address']) ? $options['value']['address'] : implode(',', $options['value']); ?>"}, |
| 28 | 28 | {preset: 'islands#greenStretchyIcon'} |
| 29 | 29 | ); |
| 30 | 30 | myMap.geoObjects.add(myMapCurPin, 0); |
| 31 | 31 | <?php |
| 32 | - } |
|
| 33 | - ?> |
|
| 32 | + } |
|
| 33 | + ?> |
|
| 34 | 34 | myMap.events.add('click', function (e) { |
| 35 | 35 | var myCoords = e.get('coords'); |
| 36 | 36 | $('#mapinputs' + uid + ' .lat').val(myCoords[0]); |
@@ -138,7 +138,7 @@ |
||
| 138 | 138 | * @return string |
| 139 | 139 | */ |
| 140 | 140 | public static function getColValue($object, $valuePath, $convert = false, $manageHref = false) { |
| 141 | - if(is_array($object)){ |
|
| 141 | + if (is_array($object)) { |
|
| 142 | 142 | $object = array_shift($object); |
| 143 | 143 | } |
| 144 | 144 | if (strpos($valuePath, ':')) { |