This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @param \DateTime $dateTime | |
* | |
* @return int - e.g. 202001 | |
*/ | |
protected function getCalendarYearWeek(DateTime $dateTime): int | |
{ | |
$week = $dateTime->format('W'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WorkingDaysCalculator | |
{ | |
const SUNDAY = 0; | |
const SATURDAY = 6; | |
/** | |
* Get next working day date | |
* | |
* @param \DateTime $baseDate - default now | |
* @param int $additionalWorkingDays - default 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\EventListener; | |
use Doctrine\ORM\Event\LoadClassMetadataEventArgs; | |
use Doctrine\ORM\Mapping\ClassMetadataInfo; | |
class TablePrefixEventListener | |
{ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\EventListener; | |
use Doctrine\ORM\Event\LoadClassMetadataEventArgs; | |
use Doctrine\ORM\Mapping\ClassMetadataInfo; | |
class TablePrefixEventListener | |
{ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$queryBuilder | |
->addSelect("(CASE WHEN entity.placedDate IS NULL THEN 1 ELSE 0 END) AS HIDDEN PLACED") | |
->orderBy('PLACED', 'DESC') | |
->addOrderBy('entity.placedDate', 'DESC'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var appUrl = 'https://www.my-website.com'; | |
var app = { | |
currentUrl: appUrl, | |
initialize: function() { | |
document.addEventListener('deviceready', this.onDeviceReady.bind(this), false); | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% trans_default_domain 'EasyAdminBundle' %} | |
{% set _paginator_request_parameters = _request_parameters|merge({'referer': null}) %} | |
{% if paginator.haveToPaginate %} | |
<div class="list-pagination"> | |
<div class="row"> | |
<div class="col-sm-3 hidden-xs list-pagination-counter"> | |
{{ 'paginator.counter'|trans({ '%start%': paginator.currentPageOffsetStart, '%end%': paginator.currentPageOffsetEnd, '%results%': paginator.nbResults})|raw }} | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# this template is located in templates/bundles/EasyAdminBundle/default/layout.html.twig #} | |
{# pay attention to the "!" in front of the bundle name which tells symfony to use the core template #} | |
{% extends '@!EasyAdmin/default/layout.html.twig' %} | |
{% block head_javascript %} | |
{{ parent() }} | |
{% block application_javascript %}{% endblock application_javascript %} | |
{% endblock head_javascript %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doctrine_migrations: | |
dir_name: "%kernel.project_dir%/src/Migrations" | |
namespace: "App\\Migrations" | |
custom_template: "%kernel.project_dir%/src/Migrations/migration.tpl" |
NewerOlder