This file contains 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" |
This file contains 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 | |
/** | |
* array_merge_recursive does indeed merge arrays, but it converts values with duplicate | |
* keys to arrays rather than overwriting the value in the first array with the duplicate | |
* value in the second array, as array_merge does. I.e., with array_merge_recursive, | |
* this happens (documented behavior): | |
* | |
* array_merge_recursive(array('key' => 'org value'), array('key' => 'new value')); | |
* => array('key' => array('org value', 'new value')); |
This file contains 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 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 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 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 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 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 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); | |
}, |
NewerOlder