mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 07:02:34 +01:00
0fbda85a59
- Removed unused uses - Type hinting for method parameters - Removed commented code - Introduced comments for classes and methods - Short array syntax
29 lines
692 B
PHP
29 lines
692 B
PHP
<?php namespace App\Ninja\Presenters;
|
|
|
|
|
|
class ClientPresenter extends EntityPresenter {
|
|
|
|
public function country()
|
|
{
|
|
return $this->entity->country ? $this->entity->country->name : '';
|
|
}
|
|
|
|
public function status()
|
|
{
|
|
$class = $text = '';
|
|
|
|
if ($this->entity->is_deleted) {
|
|
$class = 'danger';
|
|
$text = trans('texts.deleted');
|
|
} elseif ($this->entity->trashed()) {
|
|
$class = 'warning';
|
|
$text = trans('texts.archived');
|
|
} else {
|
|
$class = 'success';
|
|
$text = trans('texts.active');
|
|
}
|
|
|
|
return "<span class=\"label label-{$class}\">{$text}</span>";
|
|
}
|
|
}
|