From: soufiane Date: Tue, 13 Feb 2024 16:16:14 +0000 (+0100) Subject: wait #6717 @0:01 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=115caa83d165f4b52a15fce792430ef7af96e45f;p=fluidbook-toolbox.git wait #6717 @0:01 --- diff --git a/app/Console/Commands/FluidbookSettingsExport.php b/app/Console/Commands/FluidbookSettingsExport.php index 115af7835..23de3b740 100644 --- a/app/Console/Commands/FluidbookSettingsExport.php +++ b/app/Console/Commands/FluidbookSettingsExport.php @@ -85,18 +85,16 @@ class FluidbookSettingsExport extends ToolboxCommand foreach ($keys as $key) { $c++; - if($field[$key]['type'] !== 'hidden') { - $columns = max($columns, $c); - $cell = $sheet->getCellByColumnAndRow($c, $line); - $cell->setValue($key); - $style = $sheet->getStyleByColumnAndRow($c, $line); - if(!$field[$key]['editable'] || $field[$key]['type'] === 'noteditable') { - $style->getProtection()->setLocked(Protection::PROTECTION_PROTECTED); - $style->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setARGB('dddddd'); - } - $style->getFont()->setBold(true); - $style->getAlignment()->setVertical(Alignment::VERTICAL_CENTER); + $columns = max($columns, $c); + $cell = $sheet->getCellByColumnAndRow($c, $line); + $cell->setValue($key); + $style = $sheet->getStyleByColumnAndRow($c, $line); + if(!$field[$key]['editable'] || $field[$key]['type'] === 'noteditable') { + $style->getProtection()->setLocked(Protection::PROTECTION_PROTECTED); + $style->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setARGB('dddddd'); } + $style->getFont()->setBold(true); + $style->getAlignment()->setVertical(Alignment::VERTICAL_CENTER); } for ($i = 0; $i < sizeof($settings); $i++) { @@ -104,13 +102,13 @@ class FluidbookSettingsExport extends ToolboxCommand $line++; foreach ($keys as $key) { $columns = max($columns, $c); - if (array_key_exists($key, $settings[$i]) && $field[$key]['type'] !== 'hidden') { + if (array_key_exists($key, $settings[$i])) { $value = $settings[$i][$key] ?? ""; $value = is_array($value) ? json_encode($value) : $value; $sheet->getCellByColumnAndRow($c, $line)->setValue($value); $style = $sheet->getStyleByColumnAndRow($c, $line); - if(!$field[$key]['editable'] || $field[$key]['type'] === 'noteditable') { + if(!$field[$key]['editable'] || $field[$key]['type'] === 'noteditable' || $field[$key]['type'] === 'hidden') { $style->getProtection()->setLocked(Protection::PROTECTION_PROTECTED); $style->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setARGB('dddddd'); }