App\Ninja\Presenters\TaskPresenter::status PHP Method

status() public method

public status ( ) : string
return string
    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>";
    }