mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 23:34:28 -04:00
Alternate company logo presenter
This commit is contained in:
parent
2756ae76e7
commit
23a7cb2057
@ -30,7 +30,10 @@ class CompanyPresenter extends EntityPresenter
|
||||
//return $this->entity->name ?: ctrans('texts.untitled_account');
|
||||
}
|
||||
|
||||
public function logo($settings = null)
|
||||
/*
|
||||
@deprecated
|
||||
*/
|
||||
public function logo2($settings = null)
|
||||
{
|
||||
if (! $settings) {
|
||||
$settings = $this->entity->settings;
|
||||
@ -45,6 +48,21 @@ class CompanyPresenter extends EntityPresenter
|
||||
|
||||
}
|
||||
|
||||
public function logo($settings = null)
|
||||
{
|
||||
if (! $settings) {
|
||||
$settings = $this->entity->settings;
|
||||
}
|
||||
|
||||
if(strlen($settings->company_logo) >= 1 && (strpos($settings->company_logo, 'http') !== false))
|
||||
return "data:image/png;base64, ". base64_encode(file_get_contents($settings->company_logo));
|
||||
else if(strlen($settings->company_logo) >= 1)
|
||||
return "data:image/png;base64, ". base64_encode(file_get_contents(url('') . $settings->company_logo));
|
||||
else
|
||||
return "data:image/png;base64, ". base64_encode(file_get_contents(asset('images/new_logo.png')));
|
||||
|
||||
}
|
||||
|
||||
public function address($settings = null)
|
||||
{
|
||||
$str = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user