Release 2.31 (#5372)
* simplify translation * bump version * deprecate translations * pass date-range as argument to export and timesheet filter URL from monthly overview report * added class for use in responsive screens * show technical role name * simplify multi-update title * more statistic models * bump composer packages
This commit is contained in:
@@ -11,6 +11,7 @@ namespace App\Twig;
|
||||
|
||||
use App\Constants;
|
||||
use App\Entity\EntityWithMetaFields;
|
||||
use App\Form\Type\DateRangeType;
|
||||
use App\Utils\Color;
|
||||
use Twig\Extension\AbstractExtension;
|
||||
use Twig\TwigFilter;
|
||||
@@ -37,6 +38,7 @@ final class Extensions extends AbstractExtension
|
||||
public function getFunctions(): array
|
||||
{
|
||||
return [
|
||||
new TwigFunction('date_range', [$this, 'buildDateRange']),
|
||||
new TwigFunction('report_date', [$this, 'buildReportDate']),
|
||||
new TwigFunction('class_name', [$this, 'getClassName']),
|
||||
new TwigFunction('iso_day_by_name', [$this, 'getIsoDayByName']),
|
||||
@@ -90,6 +92,11 @@ final class Extensions extends AbstractExtension
|
||||
return $dateTime->format(self::REPORT_DATE);
|
||||
}
|
||||
|
||||
public function buildDateRange(\DateTimeInterface $begin, \DateTimeInterface $end): string
|
||||
{
|
||||
return $begin->format(self::REPORT_DATE) . DateRangeType::DATE_SPACER . $end->format(self::REPORT_DATE);
|
||||
}
|
||||
|
||||
public function getIsoDayByName(string $weekDay): int
|
||||
{
|
||||
$key = array_search(
|
||||
|
||||
Reference in New Issue
Block a user