use App\Console\Commands\Base\ToolboxCommand;
use App\Models\FluidbookPublication;
-use App\Models\Traits\PublicationSettings;
use App\Models\User;
use App\Notifications\ToolboxNotification;
-use App\SubForms\Link\Color;
use Cubist\Util\ArrayUtil;
use Cubist\Util\Files\Files;
-use Illuminate\Support\Facades\Mail;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Style\Alignment;
use PhpOffice\PhpSpreadsheet\Style\Fill;
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
use PhpOffice\PhpSpreadsheet\Style\Protection;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
-use App\Mail\Base;
class FluidbookSettingsExport extends ToolboxCommand
{
$style = $sheet->getStyleByColumnAndRow($c, $line);
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');
+ $styleArray = [
+ 'fill' => [
+ 'fillType' => Fill::FILL_SOLID,
+ 'color' => ['argb' => 'dddddd'], // Couleur grise en format ARGB
+ ],
+ ];
+ $style->applyFromArray($styleArray);
}
$style->getFont()->setBold(true);
$style->getAlignment()->setVertical(Alignment::VERTICAL_CENTER);
$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' || $field[$key]['type'] === 'hidden') {
$style->getProtection()->setLocked(Protection::PROTECTION_PROTECTED);
$style->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setARGB('dddddd');