1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00
invoiceninja/app/Ninja/Presenters/ProductPresenter.php

26 lines
516 B
PHP
Raw Normal View History

2017-01-30 20:40:43 +01:00
<?php
namespace App\Ninja\Presenters;
2016-08-10 16:04:17 +02:00
use App\Libraries\Skype\HeroCard;
class ProductPresenter extends EntityPresenter
{
2016-12-15 14:28:24 +01:00
public function user()
{
return $this->entity->user->getDisplayName();
}
2016-08-10 16:04:17 +02:00
public function skypeBot($account)
{
$product = $this->entity;
$card = new HeroCard();
$card->setTitle($product->product_key);
$card->setSubitle($account->formatMoney($product->cost));
$card->setText($product->notes);
return $card;
}
}