1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00
invoiceninja/app/Factory/DesignFactory.php

35 lines
862 B
PHP
Raw Normal View History

<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
2024-04-12 06:15:41 +02:00
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
2021-06-16 08:58:16 +02:00
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Factory;
use App\DataProviders\DesignBlocks;
use App\Models\Design;
class DesignFactory
{
2024-01-14 05:05:00 +01:00
public static function create(int $company_id, int $user_id): Design
{
$design = new Design();
$design->user_id = $user_id;
$design->company_id = $company_id;
$design->is_deleted = false;
$design->is_active = true;
$design->is_custom = true;
$design->name = '';
2023-09-22 06:46:14 +02:00
$design->is_template = false;
$design->entities = '';
$design->design = new DesignBlocks();
return $design;
}
}