mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 23:14:34 -04:00
Construct design.design from data class
This commit is contained in:
parent
7da0c6e74b
commit
1e1aa5d166
24
app/DataProviders/DesignBlocks.php
Normal file
24
app/DataProviders/DesignBlocks.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
|
*
|
||||||
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
|
||||||
|
*
|
||||||
|
* @license https://www.elastic.co/licensing/elastic-license
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\DataProviders;
|
||||||
|
|
||||||
|
class DesignBlocks
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
public string $includes = '',
|
||||||
|
public string $header = '',
|
||||||
|
public string $body = '',
|
||||||
|
public string $footer = ''
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
}
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace App\Factory;
|
namespace App\Factory;
|
||||||
|
|
||||||
|
use App\DataProviders\DesignBlocks;
|
||||||
use App\Models\Design;
|
use App\Models\Design;
|
||||||
|
|
||||||
class DesignFactory
|
class DesignFactory
|
||||||
@ -24,7 +25,7 @@ class DesignFactory
|
|||||||
$design->is_active = true;
|
$design->is_active = true;
|
||||||
$design->is_custom = true;
|
$design->is_custom = true;
|
||||||
$design->name = '';
|
$design->name = '';
|
||||||
$design->design = [];
|
$design->design = new DesignBlocks();
|
||||||
|
|
||||||
return $design;
|
return $design;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user