@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | <small style="white-space: nowrap"> |
| 3 | 3 | <a |
| 4 | 4 | title="Sort ascending" |
| 5 | - <?php if($order === 'asc'): ?> |
|
| 5 | + <?php if ($order === 'asc'): ?> |
|
| 6 | 6 | style="text-decoration: none; color: green;" |
| 7 | 7 | <?php else: ?> |
| 8 | 8 | style="text-decoration: none; color:dodgerblue;" |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | </a> |
| 14 | 14 | <a |
| 15 | 15 | title="Sort descending" |
| 16 | - <?php if($order === 'desc'): ?> |
|
| 16 | + <?php if ($order === 'desc'): ?> |
|
| 17 | 17 | style="text-decoration: none; color: green;" |
| 18 | 18 | <?php else: ?> |
| 19 | 19 | style="text-decoration: none; color:dodgerblue;" |
@@ -334,7 +334,7 @@ |
||
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | /** |
| 337 | - * @return null|Grid |
|
| 337 | + * @return Compound|null |
|
| 338 | 338 | */ |
| 339 | 339 | protected function getGrid() |
| 340 | 340 | { |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | public function getCurrentValue() |
| 105 | 105 | { |
| 106 | 106 | $func = $this->getValueCalculator(); |
| 107 | - $currentDataRow = $this->getGrid()->getCurrentRow(); |
|
| 107 | + $currentDataRow = $this->getGrid()->getCurrentRow(); |
|
| 108 | 108 | if ($func !== null) { |
| 109 | 109 | return call_user_func($func, $currentDataRow); |
| 110 | 110 | } else { |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | if ($this->dataCellPart === null) { |
| 313 | 313 | $this->dataCellPart = new Part( |
| 314 | 314 | $this->getDataCell(), |
| 315 | - 'column-' . $this->getId() . '-data-cell', |
|
| 315 | + 'column-'.$this->getId().'-data-cell', |
|
| 316 | 316 | 'record_view' |
| 317 | 317 | ); |
| 318 | 318 | } |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | if ($this->titleCellPart === null) { |
| 328 | 328 | $this->titleCellPart = new Part( |
| 329 | 329 | $this->titleCellPart = $this->getTitleCell(), |
| 330 | - 'column-' . $this->getId() . '-title-cell', |
|
| 330 | + 'column-'.$this->getId().'-title-cell', |
|
| 331 | 331 | 'title_row' |
| 332 | 332 | ); |
| 333 | 333 | } |
@@ -334,7 +334,7 @@ |
||
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | /** |
| 337 | - * @return null|Grid |
|
| 337 | + * @return Compound|null |
|
| 338 | 338 | */ |
| 339 | 339 | protected function getGrid() |
| 340 | 340 | { |
@@ -12,8 +12,8 @@ |
||
| 12 | 12 | public function register(ServiceContainer $container) |
| 13 | 13 | { |
| 14 | 14 | /** registers path to grid views */ |
| 15 | - $container->extend(ServiceId::TEMPLATE_FINDER, function (TemplateFinder $finder) { |
|
| 16 | - $finder->registerPath(dirname(__DIR__) . '/resources/views'); |
|
| 15 | + $container->extend(ServiceId::TEMPLATE_FINDER, function(TemplateFinder $finder) { |
|
| 16 | + $finder->registerPath(dirname(__DIR__).'/resources/views'); |
|
| 17 | 17 | return $finder; |
| 18 | 18 | }); |
| 19 | 19 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | public function __construct(callable $urlGenerator, ResourceManager $resourceManager = null) |
| 19 | 19 | { |
| 20 | - parent::__construct(new DataView(null, function ($url) { |
|
| 20 | + parent::__construct(new DataView(null, function($url) { |
|
| 21 | 21 | return "<div data-details-container='1' data-details-url='$url'></div>"; |
| 22 | 22 | }), $resourceManager); |
| 23 | 23 | $this->setUrlGenerator($urlGenerator); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | protected function getScriptSource() |
| 51 | 51 | { |
| 52 | - return parent::getScriptSource() . ' |
|
| 52 | + return parent::getScriptSource().' |
|
| 53 | 53 | jQuery(\'tr[data-row-with-details="1"]\').click(function() { |
| 54 | 54 | var $detailsRow = jQuery(this).next(); |
| 55 | 55 | var $detailsContainer; |
@@ -86,11 +86,11 @@ |
||
| 86 | 86 | { |
| 87 | 87 | $asc = UriFunctions::modifyQuery( |
| 88 | 88 | null, |
| 89 | - [$this->inputOption->getKey() => $this->columnId . static::DELIMITER . SortOperation::ASC] |
|
| 89 | + [$this->inputOption->getKey() => $this->columnId.static::DELIMITER.SortOperation::ASC] |
|
| 90 | 90 | ); |
| 91 | 91 | $desc = UriFunctions::modifyQuery( |
| 92 | 92 | null, |
| 93 | - [$this->inputOption->getKey() => $this->columnId . static::DELIMITER . SortOperation::DESC] |
|
| 93 | + [$this->inputOption->getKey() => $this->columnId.static::DELIMITER.SortOperation::DESC] |
|
| 94 | 94 | ); |
| 95 | 95 | $asc = UriFunctions::replaceFragment($asc, ''); |
| 96 | 96 | $desc = UriFunctions::replaceFragment($desc, ''); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | public function attachToCompound(Compound $root, $prepend = false) |
| 112 | 112 | { |
| 113 | 113 | // prepend component that will render results |
| 114 | - $root->children()->add(new DataView(function () { |
|
| 114 | + $root->children()->add(new DataView(function() { |
|
| 115 | 115 | if ($this->inputOption->hasValue()) { |
| 116 | 116 | $this->renderCsv(); |
| 117 | 117 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | ob_clean(); // removes previous output from buffer if grid was rendered inside view |
| 133 | 133 | $file = fopen('php://output', 'w'); |
| 134 | 134 | header('Content-Type: text/csv'); |
| 135 | - header('Content-Disposition: attachment; filename="' . $this->getFileName() . '"'); |
|
| 135 | + header('Content-Disposition: attachment; filename="'.$this->getFileName().'"'); |
|
| 136 | 136 | header('Pragma: no-cache'); |
| 137 | 137 | set_time_limit(0); |
| 138 | 138 | /** @var Grid $grid */ |
@@ -140,14 +140,14 @@ discard block |
||
| 140 | 140 | $valueCalculators[$column->getId()] = $column->getValueCalculator(); |
| 141 | 141 | $valueFormatters[$column->getId()] = $prevFormatter = $column->getValueFormatter(); |
| 142 | 142 | $column->setValueCalculator(null); |
| 143 | - $column->setValueFormatter(function ($value) use ($prevFormatter, $column) { |
|
| 143 | + $column->setValueFormatter(function($value) use ($prevFormatter, $column) { |
|
| 144 | 144 | $operation = $this->getOperation($column->getId()); |
| 145 | 145 | if ($prevFormatter && !($operation === static::OPERATION_IGNORE || $operation instanceof Closure)) { |
| 146 | 146 | $value = call_user_func($prevFormatter, $value); |
| 147 | 147 | } |
| 148 | 148 | // Add value prefix if specified for operation |
| 149 | 149 | if ($value !== null && is_string($operation) && array_key_exists($operation, $this->valuePrefixes)) { |
| 150 | - $value = $this->valuePrefixes[$operation] . ' ' . $value; |
|
| 150 | + $value = $this->valuePrefixes[$operation].' '.$value; |
|
| 151 | 151 | } |
| 152 | 152 | return $value; |
| 153 | 153 | }); |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | protected function replaceGridDataInjector(Grid $grid) |
| 242 | 242 | { |
| 243 | 243 | /** @var CollectionView $collectionView */ |
| 244 | - $grid->getCollectionView()->setDataInjector(function ($dataRow) use ($grid) { |
|
| 244 | + $grid->getCollectionView()->setDataInjector(function($dataRow) use ($grid) { |
|
| 245 | 245 | $grid->setCurrentRow($dataRow); |
| 246 | 246 | $this->processCurrentRow(); |
| 247 | 247 | }); |