1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00
invoiceninja/app/Ninja/Presenters/ProjectPresenter.php
2017-12-24 17:34:17 +02:00

27 lines
605 B
PHP

<?php
namespace App\Ninja\Presenters;
use Utils;
class ProjectPresenter extends EntityPresenter
{
public function calendarEvent($subColors = false)
{
$data = parent::calendarEvent();
$project = $this->entity;
$data->title = trans('texts.project') . ': ' . $project->name;
$data->start = $project->due_date;
if ($subColors) {
$data->borderColor = $data->backgroundColor = Utils::brewerColor($project->public_id);
} else {
$data->borderColor = $data->backgroundColor = '#676767';
}
return $data;
}
}