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
# if you have TRUSTED_HOSTS config in your environments, | |
# add host.docker.internal into it so that local development with docker works | |
TRUSTED_HOSTS=^(localhost|php|host.docker.internal)$ |
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 | |
//bootstrap/app.php: | |
//... | |
$app->configureMonologUsing(function ($monolog) use ($app) { | |
$publisher = new \Gelf\Publisher(new \Gelf\Transport\HttpTransport(env('GRAYLOG_HOST'), env('GRAYLOG_PORT'), env('GRAYLOG_PATH'))); | |
$failureHandler = new \Monolog\Handler\WhatFailureGroupHandler([new \Monolog\Handler\GelfHandler($publisher)]); | |
$monolog->pushHandler($failureHandler); |
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\Model; | |
use Symfony\Component\Serializer\Annotation\Groups; | |
use Symfony\Component\Serializer\Annotation\MaxDepth; | |
use Doctrine\Common\Annotations\Annotation\IgnoreAnnotation; | |
/** | |
* @IgnoreAnnotation("Primary") | |
* @IgnoreAnnotation("Identity") |
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
import {HttpParams} from "@angular/common/http"; | |
export class QueryStringBuilder { | |
static buildParametersFromSearch<T>(obj: T): HttpParams { | |
let params: HttpParams= new HttpParams(); | |
if (obj == null) | |
{ | |
return params; |
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
{% form_theme form _self %} | |
{% block checkbox_radio_label -%} | |
{# {% block _user_registration_form_termsAccepted_label %} - use this if you need it for just a single field, amend accordingly to your form type/field #} | |
{#- Do not display the label if widget is not defined in order to prevent double label rendering -#} | |
{%- if widget is defined -%} | |
{% set is_parent_custom = parent_label_class is defined and ('checkbox-custom' in parent_label_class or 'radio-custom' in parent_label_class) %} | |
{% set is_custom = label_attr.class is defined and ('checkbox-custom' in label_attr.class or 'radio-custom' in label_attr.class) %} | |
{%- if is_parent_custom or is_custom -%} | |
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' custom-control-label')|trim}) -%} |
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\EventSubscriber; | |
use App\Form\LoginType; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use Symfony\Component\Form\FormFactoryInterface; | |
use Symfony\Component\HttpFoundation\RedirectResponse; | |
use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; | |
use Symfony\Component\HttpKernel\Event\RequestEvent; |
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 | |
/** | |
* Symfony 4.4 migration file. | |
* add this file to src/migrations/ directory. | |
* github issue: https://github.com/doctrine/dbal/issues/3161 | |
*/ | |
declare(strict_types=1); | |
namespace DoctrineMigrations; |
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
{% use "bootstrap_4_layout.html.twig" %} | |
{# extend form_widget_simple #} | |
{% block form_widget_simple -%} | |
{%- if (prepend is defined) or (append is defined) -%} | |
<div class="input-group{{ group_class|default('') }}"> | |
{%- if prepend is defined -%} | |
<div class="input-group-prepend"> | |
{{ prepend|raw }} {# without raw filter the html code will be escaped #} | |
</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
const translations = { | |
monthsFull: ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık'], | |
monthsShort: ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara'], | |
//first day is Monday | |
weekdaysFull: ['Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi', 'Pazar'], | |
weekdaysShort: ['Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt', 'Paz'], | |
today: 'Bugün', | |
tomorrow: 'Yarın', | |
yesterday: 'Dün', | |
hour: 'saat', |
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 AdminBundle\Form; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | |
use Symfony\Component\OptionsResolver\OptionsResolver; | |
use Symfony\Component\Security\Core\Authorization\AuthorizationChecker; | |
use Symfony\Component\Security\Core\Role\RoleHierarchy; |
NewerOlder