1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/DataMapper/EmailTemplateDefaults.php
David Bomba 5c9ada0f77
V2 (#3089)
* Set default templates in Company Settings

* Working on Company User creation

* Working on company_user relationship

* Fixes for company_user relation

* Clean up
2019-11-23 08:10:53 +11:00

33 lines
762 B
PHP

<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\DataMapper;
use Parsedown;
class EmailTemplateDefaults
{
public static function emailInvoiceSubject()
{
return Parsedown::instance()->line(self::transformText('invoice_subject'));
}
public static function emailInvoiceTemplate()
{
return Parsedown::instance()->line(self::transformText('invoice_message'));
}
private static function transformText($string)
{
return str_replace(":", "$", ctrans('texts.'.$string));
}
}