Commit cd58f002 by Damien Moulard

Initial commit

parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

# This file is a "template" of which env vars need to be defined for your application
# Copy this file to .env file for development, create environment variables when deploying to production
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
###> symfony/framework-bundle ###
APP_ENV=prod
APP_DEBUG=0
APP_SECRET=ThisTokenIsNotSoSecretChangeIt
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2,10.0.2.2
#TRUSTED_HOSTS=localhost,example.com,kohinos.test
###< symfony/framework-bundle ###
###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Configure your db driver and server_version in config/packages/doctrine.yaml
DATABASE_URL=mysql://logindb:passworddb@127.0.0.1:3306/bddname
###< doctrine/doctrine-bundle ###
###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
MAILER_URL=smtp://localhost:25?encryption=&auth_mode=
###< symfony/swiftmailer-bundle ###
###> nelmio/cors-bundle ###
CORS_ALLOW_ORIGIN=^https?://localhost(:[0-9]+)?$
###< nelmio/cors-bundle ###
## API AUTHENTIFICATION JWT (NOT USED AT THE MOMENT) ##
###> lexik/jwt-authentication-bundle ###
#JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
#JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
#JWT_PASSPHRASE=2162f52d0600275e618fccd274c080f2
###< lexik/jwt-authentication-bundle ###
## PAYUM GATEWAYS CONFIGURATION ##
###> payum-payzen ###
PAYZEN_SITE_ID=ChangeMeWithYourPayzenCredentials
PAYZEN_CERTIFICATE=ChangeMeWithYourPayzenCredentials
PAYZEN_CTX_MODE=PRODUCTION
PAYZEN_DEBUG=false
###< payum-payzen ###
###> MAC ###
*.DS_Store
###< MAC ###
###> symfony/framework-bundle ###
/.env
/.env.test
/.env.local
/.env.*.local
/.yarnclean
/public/bundles/
/var/
/vendor/
#*.lock
###< symfony/framework-bundle ###
###> symfony/phpunit-bridge ###
.phpunit
/phpunit.xml
###< symfony/phpunit-bridge ###
###> symfony/web-server-bundle ###
/.web-server-pid
###< symfony/web-server-bundle ###
###> liip/imagine-bundle ###
/public/media/cache/
###< liip/imagine-bundle ###
###> symfony/webpack-encore-bundle ###
/node_modules/
# Remove public/build of .gitignore for posting ASSET for PRODUCTIOn (via yarn encore prod) instead of requiring yarn & encore in prod server
# /public/build/
npm-debug.log
yarn-error.log
/mlc.test-access.log
/mlc.test-error.log
###< symfony/webpack-encore-bundle ###
###> payum ###
/transactions/
###< payum ###
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
Pour l'installation du Kohinos, voir la page du wiki :
https://gitlab.com/Kohinos/kohinos/-/wikis/Installation-de-Kohinos
\ No newline at end of file
body {
background-color: lightgray;
}
#mapid {
height: 360px;
}
.exportbutton .dropdown-menu>li>a {
color: #777;
display: block;
padding: 3px 20px;
clear: both;
font-weight: 400;
line-height: 1.42857143;
color: #333;
white-space: nowrap;
}
.exportbutton .dropdown-menu>li>a:hover {
background-color: #e1e3e9;
color: #333;
}
label.required:after {
content: '*';
}
.leaflet-container {
z-index: 4;
}
\ No newline at end of file
/**
* STYLES IMPORTES DE BOOTSTRAP ET BOOTSWATCH
*
* @import "~bootswatch/dist/[theme]/variables";
* @import "~bootswatch/dist/[theme]/bootswatch";
*
* Remplacer [theme] par un des thèmes possibles :
* cerulean, cosmo, cyborg, darkly, flatly, journal, litera, lumen, lux, materia, minty, pulse, sandstone, simplex, sketchy, slate, solar, spacelab, superhero, united, yeti
*/
@import "~bootswatch/dist/lumen/variables";
@import "~bootstrap/scss/bootstrap";
@import "~bootswatch/dist/lumen/bootswatch";
// @import "~bootstrap/scss/bootstrap-grid";
/**
* STYLES DE L'APPLICATION DE L'OUTIL DE GESTION DE MONNAIE LOCALE COMPLEMENTAIRE
*/
// Modifier les couleurs de l'application :
// $primary: darken(#428bca, 20%);
// $secondary: darken(#428bca, 20%);
// Lumen 4.3.1
// Bootswatch
// Variables ===================================================================
$web-font-path: "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic" !default;
@import url($web-font-path);
@mixin shadow($width: 4px){
border-style: solid;
border-width: 0 1px $width 1px;
}
// Navbar ======================================================================
.navbar {
@include shadow();
}
.bg-primary {
border-color: darken($primary, 5%);
}
.bg-dark {
border-color: darken($dark, 5%);
}
.bg-light {
background-color: #fff !important;
border-color: darken(#fff, 5%);
}
// Buttons =====================================================================
.btn {
@include shadow();
text-transform: uppercase;
&:not(.disabled):hover {
margin-top: 1px;
border-bottom-width: 3px;
}
&:not(.disabled):active {
margin-top: 2px;
border-bottom-width: 2px;
@include box-shadow(none);
}
}
[class*="btn-outline"] {
border-top-width: 1px;
}
.btn {
&-primary {
border-color: darken($primary, 5%);
}
&-secondary {
border-color: darken($secondary, 5%);
}
&-success {
border-color: darken($success, 5%);
}
&-info {
border-color: darken($info, 5%);
}
&-danger {
border-color: darken($danger, 5%);
}
&-warning {
border-color: darken($warning, 5%);
}
&-light {
border-color: darken($light, 5%);
}
&-dark {
border-color: darken($dark, 5%);
}
}
.btn-group-vertical {
.btn + .btn {
&:hover {
margin-top: -1px;
border-top-width: 1px;
}
&:active {
margin-top: -1px;
border-top-width: 2px;
}
}
}
// Typography ==================================================================
.text-secondary {
color: $gray-700 !important;
}
.blockquote-footer {
color: $gray-600;
}
// Tables ======================================================================
.table {
&-primary,
&-success,
&-info,
&-warning,
&-danger {
color: #fff;
}
&-primary {
&, > th, > td {
background-color: $primary;
}
}
&-secondary {
&, > th, > td {
background-color: $secondary;
}
}
&-light {
&, > th, > td {
background-color: $light;
}
}
&-dark {
&, > th, > td {
background-color: $dark;
}
}
&-success {
&, > th, > td {
background-color: $success;
}
}
&-info {
&, > th, > td {
background-color: $info;
}
}
&-danger {
&, > th, > td {
background-color: $danger;
}
}
&-warning {
&, > th, > td {
background-color: $warning;
}
}
&-active {
&, > th, > td {
background-color: $table-active-bg;
}
}
&-hover {
.table-primary:hover {
&, > th, > td {
background-color: darken($primary, 5%);
}
}
.table-secondary:hover {
&, > th, > td {
background-color: darken($secondary, 5%);
}
}
.table-light:hover {
&, > th, > td {
background-color: darken($light, 5%);
}
}
.table-dark:hover {
&, > th, > td {
background-color: darken($dark, 5%);
}
}
.table-success:hover {
&, > th, > td {
background-color: darken($success, 5%);
}
}
.table-info:hover {
&, > th, > td {
background-color: darken($info, 5%);
}
}
.table-danger:hover {
&, > th, > td {
background-color: darken($danger, 5%);
}
}
.table-warning:hover {
&, > th, > td {
background-color: darken($warning, 5%);
}
}
.table-active:hover {
&, > th, > td {
background-color: $table-active-bg;
}
}
}
}
// Forms =======================================================================
.form-control {
box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.075);
}
.input-group-sm {
> .input-group-prepend,
> .input-group-append {
.btn {
font-size: $btn-font-size-sm;
}
}
}
// Navs ========================================================================
.nav {
.open > a,
.open > a:hover,
.open > a:focus {
border-color: transparent;
}
}
.nav-tabs {
.nav-link {
color: $body-color;
&,
&.disabled,
&.disabled:hover,
&.disabled:focus {
margin-top: 6px;
border-color: $nav-tabs-border-color;
transition: all 0.2s ease-in-out;
}
&:not(.disabled):hover,
&:not(.disabled):focus,
&.active {
padding-bottom: calc(0.5em + 6px);
border-bottom-color: transparent;
margin-top: 0;
}
}
&.nav-justified > li {
vertical-align: bottom;
}
}
.dropdown-menu {
margin-top: 0;
@include shadow();
border-top-width: 1px;
@include box-shadow(none);
}
.breadcrumb {
border-color: darken($breadcrumb-bg, 5%);
@include shadow();
}
.pagination {
> li > a,
> li > span {
position: relative;
top: 0;
@include shadow();
color: $pagination-color;
font-size: 12px;
font-weight: bold;
text-transform: uppercase;
&:hover,
&:focus {
top: 1px;
border-bottom-width: 3px;
text-decoration: none;
}
&:active {
top: 2px;
border-bottom-width: 2px;
}
}
> .disabled > a,
> .disabled > span {
&:hover {
top: 0;
@include shadow();
}
&:active {
top: 0;
@include shadow();
}
}
}
.pager {
> li > a,
> li > span,
> .disabled > a,
> .disabled > span {
&,
&:hover,
&:active {
border-left-width: 2px;
border-right-width: 2px;
}
}
}
// Indicators ==================================================================
.close {
text-decoration: none;
opacity: 0.4;
&:hover,
&:focus {
opacity: 1;
}
}
.alert {
color: $white;
@include shadow();
&-primary {
background-color: $primary;
border-color: darken($primary, 5%);
}
&-secondary {
background-color: $secondary;
border-color: darken($secondary, 5%);
}
&-success {
background-color: $success;
border-color: darken($success, 5%);
}
&-info {
background-color: $info;
border-color: darken($info, 5%);
}
&-danger {
background-color: $danger;
border-color: darken($danger, 5%);
}
&-warning {
background-color: $warning;
border-color: darken($warning, 5%);
}
&-dark {
background-color: $dark;
border-color: darken($dark, 5%);
}
&-light {
background-color: $light;
border-color: darken($light, 5%);
}
.alert-link {
font-weight: normal;
color: #fff;
text-decoration: underline;
}
&-secondary,
&-light {
&,
& a,
& .alert-link {
color: $body-color;
}
}
}
.badge {
&-warning,
&-info {
color: $white;
}
}
// Progress bars ===============================================================
// Containers ==================================================================
a.list-group-item {
&-success {
&.active {
background-color: $success;
}
&.active:hover,
&.active:focus {
background-color: darken($success, 5%);
}
}
&-warning {
&.active {
background-color: $warning;
}
&.active:hover,
&.active:focus {
background-color: darken($warning, 5%);
}
}
&-danger {
&.active {
background-color: $danger;
}
&.active:hover,
&.active:focus {
background-color: darken($danger, 5%);
}
}
}
.jumbotron {
border: 1px solid $gray-200;
box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.05);
}
.modal {
.close {
color: $black;
&:not(:disabled):not(.disabled):hover,
&:not(:disabled):not(.disabled):focus {
color: $black;
}
}
}
// Lumen 4.3.1
// Bootswatch
//
// Color system
//
$white: #fff !default;
$gray-100: #f6f6f6 !default;
$gray-200: #f0f0f0 !default;
$gray-300: #dee2e6 !default;
$gray-400: #ced4da !default;
$gray-500: #adb5bd !default;
$gray-600: #999 !default;
$gray-700: #555 !default;
$gray-800: #333 !default;
$gray-900: #222 !default;
$black: #000 !default;
$blue: #158CBA !default;
$indigo: #6610f2 !default;
$purple: #6f42c1 !default;
$pink: #e83e8c !default;
$red: #FF4136 !default;
$orange: #fd7e14 !default;
$yellow: #FF851B !default;
$green: #28B62C !default;
$teal: #20c997 !default;
$cyan: #75CAEB !default;
$primary: $blue !default;
$secondary: $gray-200 !default;
$success: $green !default;
$info: $cyan !default;
$warning: $yellow !default;
$danger: $red !default;
$light: $gray-100 !default;
$dark: $gray-700 !default;
$yiq-contrasted-threshold: 200 !default;
// Fonts
$font-family-sans-serif: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
$font-size-base: 0.875rem !default;
// Buttons
$btn-font-size: 0.75rem !default;
$btn-font-size-sm: 0.625rem !default;
$btn-font-weight: bold !default;
// Dropdowns
$dropdown-link-color: rgba(0,0,0,.5) !default;
// Navs
$nav-tabs-border-color: $gray-200 !default;
$nav-tabs-link-hover-border-color: $nav-tabs-border-color !default;
$nav-tabs-link-active-color: $gray-900 !default;
$nav-tabs-link-active-border-color: $nav-tabs-border-color !default;
// Pagination
$pagination-color: $gray-700 !default;
$pagination-bg: $gray-200 !default;
$pagination-hover-color: $pagination-color !default;
$pagination-hover-bg: $pagination-bg !default;
$pagination-active-border-color: darken($primary, 5%) !default;
$pagination-disabled-color: $gray-600 !default;
$pagination-disabled-bg: $pagination-bg !default;
// Jumbotron
$jumbotron-bg: #fafafa !default;
// Modals
$modal-content-border-color: rgba($black,.1) !default;
// Close
$close-color: $white !default;
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* Welcome to your app's main JavaScript file!
*
* We recommend including the built version of this JavaScript file
* (and its CSS file) in your base layout (base.html.twig).
*/
// any CSS you require will output into a single css file (app.css in this case)
require('../css/admin.css');
require('bootstrap');
require('../js/geoloc.js');
$('#flash-messages').flashNotification('init');
$(document).ready(function() {
$('.editableboolean').on('click', function (e) {
e.preventDefault();
var self = $(this);
$.ajax({
url : self.data('url'),
type: 'post',
data : {'value' : (self.data('value') == 'true')},
success: function(data) {
if(data.status == 'success' && !data.messages) {
if (data.newvalue == 'false') {
self.text('non');
self.data('value', 'false');
self.addClass('label-danger');
self.removeClass('label-success');
} else {
self.data('value', 'true');
self.text('oui');
self.removeClass('label-danger');
self.addClass('label-success');
}
} else {
// $(this).addClass('error');
}
}
});
});
});
\ No newline at end of file
/*
* Welcome to your app's main JavaScript file!
*
* We recommend including the built version of this JavaScript file
* (and its CSS file) in your base layout (base.html.twig).
*/
// any CSS you require will output into a single css file (app.css in this case)
// UTILISER LES FONT AWESOME POUR L'ICONOGRAPHIE
require('../../public/fontawesome/css/all.min.css');
// CSS DU KOHINOS
require('../css/app.css');
// THEME BOOTSTRAP / BOOTSWATCH + CONFIGURATION GLOBALE (COULEURS, FONTS...)
require('../css/global.scss');
// Need jQuery? Install it with "yarn add jquery", then uncomment to require it.
// require jQuery normally
const $ = require('jquery');
// create global $ and jQuery variables
global.$ = global.jQuery = $;
// JS is equivalent to the normal "bootstrap" package
// no need to set this to a variable, just require it
// require('popper.js/dist/popper.js');
require('bootstrap');
// leaftlet : for openstreetmap
require('../leaflet/leaflet.js');
// for flash message notification
require('../js/flash-messages.js');
// MLC js
require('../js/mlc.js');
require('../js/geoloc.js');
// can be use to sort with drag'n drop in sonata admin
// require('../../public/bundles/pixsortablebehavior/js/init.js');
$('#flash-messages').flashNotification('init');
var $collectionHolder;
// setup an "add a groupe presta (marché amap" link
var $addGroupeButton = $('<button type="button" class="add_groupe_link">Ajouter AMAP / Marché</button>');
var $newLinkLi = $('<p></p>').append($addGroupeButton);
/* */
function addGroupeForm($collectionHolder, $newLinkLi) {
// Get the data-prototype explained earlier
var prototype = $collectionHolder.data('prototype');
// get the new index
var index = $collectionHolder.data('index');
// Replace '__name__' in the prototype's HTML to
// instead be a number based on how many items we have
var newForm = prototype.replace(/__name__/g, index);
// increase the index with one for the next item
$collectionHolder.data('index', index + 1);
// Display the form in the page in an li, before the "Add a groupe" link li
var $newFormLi = $('<p></p>').append(newForm);
$newLinkLi.before($newFormLi);
}
jQuery(document).ready(function() {
// Get the ul that holds the collection of groupes
$collectionHolder = $('.groupeprestas');
// add the "add a groupe" anchor and li to the groupes ul
$collectionHolder.append($newLinkLi);
// count the current form inputs we have (e.g. 2), use that as the new
// index when inserting a new item (e.g. 2)
$collectionHolder.data('index', $collectionHolder.find(':input').length);
$addGroupeButton.on('click', function(e) {
// add a new groupe form (see next code block)
addGroupeForm($collectionHolder, $newLinkLi);
});
// BOOTSTRAP TOOLTIPS
$('[data-toggle="tooltip"]').tooltip()
});
/* JAVASCRIPT PERMETTANT L'AFFICHAGE DE MESSAGE FLASH / NOTIFICATION */
(function($) {
var methods = {
init: function(options) {
methods.settings = $.extend({}, $.fn.flashNotification.defaults, options);
setTimeout(
function() {
$('.alert')
.show('slow')
.delay(methods.settings.hideDelay)
.hide('fast')
;
},
500
);
methods.listenIncomingMessages();
},
/**
* Listen to AJAX responses and display messages if they contain some
*/
listenIncomingMessages: function() {
$(document).ajaxComplete(function(event, xhr, settings) {
var data = $.parseJSON(xhr.responseText);
if (data.messages) {
var messages = data.messages;
var i;
if (messages.error) {
for (i = 0; i < messages.error.length; i++) {
methods.addError(messages.error[i]);
}
}
if (messages.success) {
for (i = 0; i < messages.success.length; i++) {
methods.addSuccess(messages.success[i]);
}
}
if (messages.info) {
for (i = 0; i < messages.info.length; i++) {
methods.addInfo(messages.info[i]);
}
}
}
});
},
addSuccess: function(message) {
var flashMessageElt = methods.getBasicFlash(message).addClass('alert-success');
methods.addToList(flashMessageElt);
methods.display(flashMessageElt);
},
addError: function(message) {
var flashMessageElt = methods.getBasicFlash(message).addClass('alert-error');
methods.addToList(flashMessageElt);
methods.display(flashMessageElt);
},
addInfo: function(message) {
var flashMessageElt = methods.getBasicFlash(message).addClass('alert-info');
methods.addToList(flashMessageElt);
methods.display(flashMessageElt);
},
getBasicFlash: function(message) {
var flashMessageElt = $('<div></div>')
.hide()
.addClass('alert')
.append(methods.getCloseButton())
.append($('<div></div>').html(message))
;
return flashMessageElt;
},
getCloseButton: function() {
var closeButtonElt = $('<button></button>')
.addClass('close')
.attr('data-dismiss', 'alert')
.html('&times')
;
return closeButtonElt;
},
addToList: function(flashMessageElt) {
flashMessageElt.appendTo($('#flash-messages'));
},
display: function(flashMessageElt) {
setTimeout(
function() {
flashMessageElt
.show('slow')
.delay(methods.settings.hideDelay)
.hide('fast', function() { $(this).remove(); } )
;
},
500
);
}
};
$.fn.flashNotification = function(method) {
// Method calling logic
if (methods[method]) {
return methods[ method ].apply(this, Array.prototype.slice.call(arguments, 1));
} else if (typeof method === 'object' || ! method) {
return methods.init.apply(this, arguments);
} else {
$.error('Method ' + method + ' does not exist on jQuery.flashNotification');
}
};
$.fn.flashNotification.defaults = {
'hideDelay' : 4500,
'autoHide' : true,
'animate' : true
};
})(jQuery);
\ No newline at end of file
require('../leaflet/leaflet.js');
require('../js/flash-messages.js');
$(document).ready(function() {
var mapMarkers = [];
$(document).on('click', '.searchLatLon', function (e) {
e.preventDefault();
var self = $(this);
$.ajax({
url : self.data('url'),
type: 'post',
data : {'adresse' : $('#'+(self.attr('id').replace('_geoloc_search', ''))+'_geoloc_adresse').val(), 'cpostal' : $('#'+(self.attr('id').replace('_geoloc_search', ''))+'_geoloc_cpostal').val(), 'ville' : $('#'+(self.attr('id').replace('_geoloc_search', ''))+'_geoloc_ville').val()},
success: function(response) {
var divid = self.attr('id').replace('_geoloc_search', '');
$('#'+divid+'_message').remove();
$('#'+divid+'_map').remove();
var marker_1 = null;
if(response.status == 'success' && response.data && response.data.lat != '' && response.data.lon != '') {
$('#'+divid+'_geoloc_lat').val(response.data.lat);
$('#'+divid+'_geoloc_lon').val(response.data.lon);
$('#'+divid+'_geoloc_lat').addClass('inputsuccess');
$('#'+divid+'_geoloc_lon').addClass('inputsuccess');
$('<p id="'+(divid+'_message')+'">Cliquez sur la carte si vous voulez affiner la géolocalisation</p><div id="'+(divid+'_map')+'" style="height: 250px;margin-top: 10px;"></div>').insertAfter('#'+self.attr('id'));
var latlon = L.latLng(parseFloat(response.data.lat), parseFloat(response.data.lon));
var mymap = L.map(divid+'_map').setView(latlon, 13);
L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {maxZoom: 18, attribution: '&copy; Openstreetmap France | &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(mymap);
var marker_1 = L.marker(latlon).addTo(mymap);
} else {
$(this).addClass('inputerror');
$('<p id="'+(divid+'_message')+'">ADRESSE INCONNUE : Cliquez sur la carte pour définir une adresse</p><div id="'+(divid+'_map')+'" style="height: 250px;margin-top: 10px;"></div>').insertAfter('#'+self.attr('id'));
var mymap = L.map(divid+'_map').setView(JSON.parse($('#koh_map_center').val()), parseInt($('#koh_map_zoom').val()));
L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {maxZoom: 18, attribution: '&copy; Openstreetmap France | &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(mymap);
}
mymap.on('click', function(e){
if (marker_1 != null) {
mymap.removeLayer(marker_1);
}
for(var i = 0; i < mapMarkers.length; i++){
mymap.removeLayer(mapMarkers[i]);
}
// Add marker to map at click location; add popup window
var newMarker = new L.marker(e.latlng);
newMarker.addTo(mymap);
mapMarkers.push(newMarker);
$('#'+divid+'_geoloc_lat').val(e.latlng.lat);
$('#'+divid+'_geoloc_lon').val(e.latlng.lng);
$('#'+divid+'_geoloc_lat').addClass('inputsuccess');
$('#'+divid+'_geoloc_lon').addClass('inputsuccess');
});
}
});
});
});
\ No newline at end of file
/**
* JAVASCRIPT PRINCIPAL DE L'OUTIL DE GESTION DE MONNAIE LOCALE COMPLEMENTAIRE
*
* Mettre ici les javscripts nécessaires à votre application !
*/
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/usr/bin/env php
<?php
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Debug\Debug;
set_time_limit(0);
require dirname(__DIR__).'/vendor/autoload.php';
if (!class_exists(Application::class)) {
throw new \RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
}
Kernel::bootstrapCli($_SERVER['argv']);
Kernel::bootstrapEnv();
if ($_SERVER['APP_DEBUG']) {
umask(0000);
if (class_exists(Debug::class)) {
Debug::enable();
}
}
$kernel = new Kernel($_SERVER['APP_ENV'], $_SERVER['APP_DEBUG']);
$application = new Application($kernel);
$application->run();
#!/usr/bin/env php
<?php
if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
}
$classLoader = require dirname(__DIR__).'/vendor/autoload.php';
App\Kernel::bootstrapEnv('test');
// $classLoader->unregister();
if (false === getenv('SYMFONY_PHPUNIT_REMOVE')) {
putenv('SYMFONY_PHPUNIT_REMOVE=');
}
if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
}
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';
{
"type": "project",
"homepage": "https://www.kohinos.com",
"description": "Kohinos : Outil de gestion de monnaie locale complémentaire",
"license": "AGPLv3",
"authors": [
{
"name": "Julien Jorry",
"email": "julien.jorry@gmail.com",
"homepage": "https://www.malt.fr/profile/julienjorry"
}
],
"require": {
"php": "^7.4",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-intl": "*",
"api-platform/api-pack": "^1.2",
"beberlei/doctrineextensions": "^1.2",
"doctrine/annotations": "^1.8",
"doctrine/doctrine-fixtures-bundle": "^3.0",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/migrations": "^3.0",
"ekyna/payum-payzen": "@dev",
"friendsofsymfony/user-bundle": "^2.1",
"geocoder-php/cache-provider": "^4.1",
"geocoder-php/google-maps-provider": "^4.3",
"geocoder-php/nominatim-provider": "^5.0",
"hautelook/alice-bundle": "^2.3",
"knplabs/knp-paginator-bundle": "^2.8",
"lexik/translation-bundle": "~4.0",
"liip/imagine-bundle": "^2.1",
"nelmio/api-doc-bundle": "^3.3",
"payum/offline": "^1.6",
"payum/payum-bundle": "^2.4",
"php-http/guzzle6-adapter": "^2.0",
"php-http/message": "^1.7",
"pixassociates/sortable-behavior-bundle": "^1.5",
"prodigious/sonata-menu-bundle": "^3.0",
"sensio/framework-extra-bundle": "^5.1",
"sensiolabs/security-checker": "^5.0",
"sonata-project/admin-bundle": "^3.65",
"sonata-project/block-bundle": "^3.18",
"sonata-project/classification-bundle": "^3.11",
"sonata-project/core-bundle": "^3.18",
"sonata-project/doctrine-orm-admin-bundle": "^3.6",
"sonata-project/easy-extends-bundle": "^2.5",
"sonata-project/formatter-bundle": "^4.1",
"sonata-project/intl-bundle": "^2.5",
"sonata-project/media-bundle": "^3.24",
"sonata-project/translation-bundle": "^2.4",
"sonata-project/user-bundle": "^4.3",
"stof/doctrine-extensions-bundle": "^1.3",
"symfony/apache-pack": "^1.0",
"symfony/asset": "4.4.*",
"symfony/cache": "4.4.*",
"symfony/console": "4.4.*",
"symfony/dotenv": "4.4.*",
"symfony/expression-language": "4.4.*",
"symfony/flex": "^1.1",
"symfony/form": "4.4.*",
"symfony/framework-bundle": "4.4.*",
"symfony/monolog-bundle": "^3.1",
"symfony/orm-pack": "*",
"symfony/process": "4.4.*",
"symfony/security-bundle": "4.4.*",
"symfony/serializer-pack": "*",
"symfony/swiftmailer-bundle": "^3.1",
"symfony/translation": "4.4.*",
"symfony/twig-bundle": "4.4.*",
"symfony/twig-pack": "^1.0",
"symfony/validator": "4.4.*",
"symfony/web-link": "4.4.*",
"symfony/webpack-encore-bundle": "^1.7",
"symfony/yaml": "4.4.*",
"vich/uploader-bundle": "^1.8",
"willdurand/geocoder-bundle": "^5.0"
},
"require-dev": {
"symfony/browser-kit": "4.4.*",
"symfony/css-selector": "4.4.*",
"symfony/debug-pack": "*",
"symfony/maker-bundle": "^1.0",
"symfony/phpunit-bridge": "4.4.*",
"symfony/profiler-pack": "*",
"symfony/test-pack": "^1.0",
"symfony/var-dumper": "4.4.*",
"symfony/web-server-bundle": "4.4.*"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd",
"security-checker security:check": "script"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": true,
"require": "4.4.*"
}
},
"repositories": [
{
"type": "path",
"url": "./lib/ekyna/payum-payzen"
}
]
}
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php
use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__).'/vendor/autoload.php';
if (!array_key_exists('APP_ENV', $_SERVER)) {
$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] ?? null;
}
if ('prod' !== $_SERVER['APP_ENV']) {
if (!class_exists(Dotenv::class)) {
throw new RuntimeException('The "APP_ENV" environment variable is not set to "prod". Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
}
(new Dotenv())->loadEnv(dirname(__DIR__).'/.env');
}
$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $_SERVER['APP_ENV'] ?: $_ENV['APP_ENV'] ?: 'dev';
$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV'];
$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0';
<?php
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true],
FOS\UserBundle\FOSUserBundle::class => ['all' => true],
Sonata\DatagridBundle\SonataDatagridBundle::class => ['all' => true],
Sonata\CoreBundle\SonataCoreBundle::class => ['all' => true],
Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true],
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
Sonata\AdminBundle\SonataAdminBundle::class => ['all' => true],
Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true],
Sonata\EasyExtendsBundle\SonataEasyExtendsBundle::class => ['all' => true],
Sonata\UserBundle\SonataUserBundle::class => ['all' => true],
Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle::class => ['all' => true],
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
Vich\UploaderBundle\VichUploaderBundle::class => ['all' => true],
Pix\SortableBehaviorBundle\PixSortableBehaviorBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Nelmio\ApiDocBundle\NelmioApiDocBundle::class => ['all' => true],
Knp\Bundle\PaginatorBundle\KnpPaginatorBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['all' => true],
Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['all' => true],
Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle::class => ['all' => true],
Hautelook\AliceBundle\HautelookAliceBundle::class => ['all' => true],
JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true],
Sonata\MediaBundle\SonataMediaBundle::class => ['all' => true],
App\Application\Sonata\MediaBundle\ApplicationSonataMediaBundle::class => ['all' => true],
Bazinga\GeocoderBundle\BazingaGeocoderBundle::class => ['all' => true],
Sonata\TranslationBundle\SonataTranslationBundle::class => ['all' => true],
Sonata\IntlBundle\SonataIntlBundle::class => ['all' => true],
Lexik\Bundle\TranslationBundle\LexikTranslationBundle::class => ['all' => true],
Prodigious\Sonata\MenuBundle\ProdigiousSonataMenuBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Knp\Bundle\MarkdownBundle\KnpMarkdownBundle::class => ['all' => true],
FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true],
Sonata\FormatterBundle\SonataFormatterBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Sonata\ClassificationBundle\SonataClassificationBundle::class => ['all' => true],
App\Application\Sonata\ClassificationBundle\ApplicationSonataClassificationBundle::class => ['all' => true],
Payum\Bundle\PayumBundle\PayumBundle::class => ['all' => true],
];
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,A349B77C39020ABC46D4DF9CDD9B5915
pOxoNpWQRxlmZHKi4BjIi9LLiMN+7+WKmdITOCKGqoZO8NS11aU+QUznN5m2uLyr
CyulcZwpG3eQfVivl6PJrFMq4h6i4q7W2icL9sJeUgTZQWyiks6uyCj90br5ITE1
1p+n+j21liyQqtPdwiOQgkLo0W7OTNhFuDYC+tvbLn847mnGdLV7GVKeMzIwHMp+
X9+G8zBeImBduVExdPSKO7QGthdu4Txxt0qbjFyOCycsuRg9yscCHlvvD3iiJIOu
MPh0/rqFL6D/FVJHvT47GrJhH+jGrpKAF6zP0s90tYluONK+E6zWtlt5ybRfo5Es
3DzD8iUWwbPmVuNS/3BVuhRkcHGQH6Y4tMo9uxJVsUou+SyaOTTikwGKYGQ1LDsn
zFPRzCmqDd7xifI8xqLWrlIvn77joog+dG5GozdkSHkP5Yl66jA7ijRMBtgZRZvz
+R0DkD/nx4DweH64+rPuPRmmyd7yh9DtnZeoMcDY10ammmrbcrmIJQmmyRWYt08t
Y3gJd4M7pl82FinjzoSB9pbh9crn9vEEWBjxYJ96a57Ib5lqf+It1pzpIwWB/9Vx
mi3pRyIBh2vKtoEdMNzEw8qJTrWTc5u5wcPfNhWEJn45zNZ2bt1dkUwZ/l1r/B74
zHEKck/P/i56C3u6vTUBv3z3mIWDb6qlKU5d/y+FZx9Kh+i09w4sI8r8SOUwWjC0
Zp3Ll13klqgN4wSmVFntSpMbizdQeFe6Huhh7gXEwCKsSwhf4Ep0SxnnBOr6jD38
fvDPpTX1Hdm8wnF5D58QPB6bvTqz/F1Nrt8FCtE9o0UA0ZneGPfZd2KRjmtvyURd
P0abK0V7qBOCXJpE1Fd5nj0tg6BlfwSm5szQsCAEYnTBEgDfTZdFAngdksxFV42N
R5hxHEQd+oYK3XolYauZHXajrJwO/+jHuKDyrUhm0KXILasC56OVOgTmjLKl8NPn
wINNNto+OWSBzHfaT50JdCDGE+iAk92bew9HKBxsFtaIdZQBGTTO4Db7J3fDwyfT
pyZ8kllBRINewnocYwfa8wDU+42xdRO3XlGl85nicy1zdJVV9grQOIczRTJ+dfk0
+Ms7ve9ux+N6vXBDWCx3nc1OfWQKL/3fKQ+BZOdBVnImr13d350PBwnWIBY32nld
kEilDZwZeyM51O7UOP3/ZDLwiCj0fJEDTZZA+Lm67iOdHQAGSihWPlHlSAIPjVbP
yoBsPUGyY33csj9vByHIlEC+j89dt/FPiYiZA/dp25o65ZMxqvP+pvK5g2KeSITk
PSNxiAt5WndRd185+k6QsEi3BQX90fp/OLAlyFPDNmwQq1mjYw+9CXPdvaedmSzp
BVRFWvXlHqtwQhakAbz5rUNGOPZl+IgBYromm0jdbex+PjLS2pOIpDX/7IIWRTxd
a+cLxaww5z8ck9tvsFZgkH1UQcTtSLW/G2J9nIwW2ulYXjAzU3pPX9YD3HJZDrJ8
rNcHWGErw1AQq/3PyFG/lJ5TYGpaNvCtDfkecWTZjIf1W7flaC2m3XSQfV78+AuC
Eq2GXtdoWzg/zZSwjOQk6GyBVg3Ar7EO0D1/B13VRUykYjnMtbO6cHpWk1HDGYh/
6gBpDPkq7cE4E31kg5G3293JTs5BkVDYAz01ONQKswOcNKNr007c0mTWgWWH3sBz
VD3AEANAml++oviMEpOi+/e+E1PoQteJ3sMzE7hnGQin5EbIwJ2Y6xoqBMJKd05U
nM+fQH1l+Jygo/oyVTZvt7iRrV5LfF/7TBWDDoCkJ4CoO3S2JxaZwCaUBS3yTKZO
fANX1wox0vHsyDMMoxQFciULWdTmEXN9CetRaCYcCX1NpD/vM/9VgdHGBW8qfibv
hY0Cqd+0YPO1NRfkKEGgdsZ02pf8l+YcLd3Q0IKM2t2DIZ1WqEh+ZtgHI5XwTCjY
0y0c6UnITloH6wFmy7+bRMzdYoVLeJmMFdCBXBcMwtfuT8b/UqZhcvzXNxJWFnna
Lk6hR6kWfLAki+xgNMy9KFqfURGSzf0o1+UPM9X6ox08+6yI47dRHhlfLvk/Jsex
SvLNCotGw3PM8saiUGx0D8S7iE0RWl4LoVRVEETjxOpXtFES++tHcHq2dhc5Zu/c
b/zfMpa/2aXOtGCASpVzKS2xJMQgzL7hmeoFvNtYlqCQOSY+MJLAszI/WvrqmZMC
P9IFqbjqRWxlFS3j2Srdprexp/M8BenmHLvvtl7vBLy4ZdnpnTERb4+J7jH5LqT3
y/uil2O6OidA8Smsy6EJJey3nHXGgdRunPVQxJHsF+chKwUECNVYMnLmaIvYlZft
33ey/6H0pQqr8z6TLU03WV5wq7f5by/d5LakVTzhW3coZLH7yxGIYDcTEn8eEhjK
zkfFa3I7JqZ7WMTN8iG40xgpXYTx7y3a6YX8rxYeIQESnJDqmikD0d1mtOJCBMNY
AIVTSpSyQGt5Nr5e+3O6RpibA5h+34ppBWRlOS88dE2YaEd/fZ8I2ofDqtGhlZeS
FeC7atJmroA2lCcbiGXfLX1lWq//GqZVGMtUstGuK9WewrnsWhhRPex3V2V5M932
4Ekx2slDVSdtCzVZSVH3vJPgHzeTFBpbF4agCktlcjymK68uKxEomRs9oytV/z9x
IHaYoaoZpwymJZOs8Fn/wAndMGyryzqLUPqxHqD9kikLh6Sq3qDcnrwdYI58vHf8
n71q2RmfctFZ+8P1L10wEgNQj6Ydd7RCO+DYqs8cSff0bI8um+CBonZZQKhVIXf8
RaB/N0aOeoyTFcoOiaYshdVKJ52vDf+F8/3sFqQBC3NCgBPxMe+BT4NULXInqOh0
O4cnQSRR/lhz911579AJwpJGSO9CSpCbrQR3T1S+VXd9ZsFCSYqZMWcGkD4+g5KI
d/4NHS/Q04DHHzWCAQQmtQNuJks5L8iOqFm9l3RwilIntBObjjWabdNWAxB05ruE
NMBsPwAYBekAgYUGhOtCEBQ4gmzaBy6j825dWLzO4UUfBtPux5ttJXb0P3dacZuC
dhxGCh8olwPqGIFF66NFSzO212UORUYYdx419kiO+7KOdn0ZLUze0vne5optKbxE
OS9py/N/wl/SEmwYDsqmxll0GVFsEtVa4EskWlb//ntuQ9KOjxshDv4TYAwjOOIr
-----END RSA PRIVATE KEY-----
api_platform:
title: 'API Kohinos'
version: '2.3.0'
enable_fos_user: true
# enable_entrypoint: false
mapping:
paths: ['%kernel.project_dir%/src/Entity']
swagger:
api_keys:
apiKey:
name: API-AUTH-TOKEN
type: header
##############################
### DEFAULT CONFIGURATION ###
##############################
#
# api_platform:
# # The title of the API.
# title: 'API title'
# # The description of the API.
# description: 'API description'
# # The version of the API.
# version: '0.0.0'
# # Set this to false if you want Webby to disappear.
# show_webby: true
# # Specify a name converter to use.
# name_converter: ~
# # Specify a path name generator to use.
# path_segment_name_generator: 'api_platform.path_segment_name_generator.underscore'
# # Allow using plain IDs for JSON format
# allow_plain_identifiers: false
# validator:
# # Enable the serialization of payload fields when a validation error is thrown
# # If you want to serialize only some payload fields, define them like this [ severity, anotherPayloadField ]
# serialize_payload_fields: []
# eager_loading:
# # To enable or disable eager loading.
# enabled: true
# # Fetch only partial data according to serialization groups.
# # If enabled, Doctrine ORM entities will not work as expected if any of the other fields are used.
# fetch_partial: false
# # Max number of joined relations before EagerLoading throws a RuntimeException.
# max_joins: 30
# # Force join on every relation.
# # If disabled, it will only join relations having the EAGER fetch mode.
# force_eager: true
# # Enable the FOSUserBundle integration.
# enable_fos_user: false
# # Enabling the NelmioApiDocBundle integration has been deprecated in 2.2 and will be removed in 3.0.
# # NelmioApiDocBundle 3 has native support for API Platform
# enable_nelmio_api_doc: false
# # Enable the Swagger documentation and export.
# enable_swagger: true
# # Enable Swagger ui.
# enable_swagger_ui: true
# # Enable ReDoc.
# enable_re_doc: true
# # Enable the entrypoint.
# enable_entrypoint: true
# # Enable the docs.
# enable_docs: true
# # Enable the data collector and the WebProfilerBundle integration.
# enable_profiler: true
# collection:
# # The name of the query parameter to filter nullable results (with the ExistsFilter).
# exists_parameter_name: 'exists'
# # The default order of results.
# order: 'ASC'
# # The name of the query parameter to order results (with the OrderFilter).
# order_parameter_name: 'order'
# pagination:
# # To enable or disable pagination for all resource collections by default.
# enabled: true
# # To allow partial pagination for all resource collections.
# # This improves performances by skipping the `COUNT` query.
# partial: false
# # To allow the client to enable or disable the pagination.
# client_enabled: false
# # To allow the client to set the number of items per page.
# client_items_per_page: false
# # To allow the client to enable or disable the partial pagination.
# client_partial: false
# # The default number of items per page.
# items_per_page: 30
# # The maximum number of items per page.
# maximum_items_per_page: ~
# # The default name of the parameter handling the page number.
# page_parameter_name: 'page'
# # The name of the query parameter to enable or disable pagination.
# enabled_parameter_name: 'pagination'
# # The name of the query parameter to set the number of items per page.
# items_per_page_parameter_name: 'itemsPerPage'
# # The name of the query parameter to enable or disable the partial pagination.
# partial_parameter_name: 'partial'
# mapping:
# # The list of paths with files or directories where the bundle will look for additional resource files.
# paths: []
# # The list of your resources class directories. Defaults to the directories of the mapping paths but might differ.
# resource_class_directories:
# - '%kernel.project_dir%/src/Entity'
# doctrine:
# # To enable or disable Doctrine ORM support.
# enabled: true
# doctrine_mongodb_odm:
# # To enable or disable Doctrine MongoDB ODM support.
# enabled: false
# oauth:
# # To enable or disable oauth.
# enabled: false
# # The oauth client id.
# clientId: ''
# # The oauth client secret.
# clientSecret: ''
# # The oauth type.
# type: 'oauth2'
# # The oauth flow grant type.
# flow: 'application'
# # The oauth token url.
# tokenUrl: '/oauth/v2/token'
# # The oauth authentication url.
# authorizationUrl: '/oauth/v2/auth'
# # The oauth scopes.
# scopes: []
# graphql:
# # Enabled by default with installed GraphQL
# enabled: false
# # The default IDE (graphiql or graphql-playground) used when going to the GraphQL endpoint. False to disable.
# default_ide: 'graphiql'
# graphiql:
# # Enabled by default with installed GraphQL and Twig
# enabled: false
# graphql_playground:
# # Enabled by default with installed GraphQL and Twig
# enabled: false
# # The nesting separator used in the filter names.
# nesting_separator: _
# collection:
# pagination:
# enabled: true
# swagger:
# # The active versions of OpenAPI to be exported or used in the swagger_ui. The first value is the default.
# versions: [2, 3]
# # The swagger api keys.
# api_keys: []
# # The name of the header or query parameter containing the api key.
# # name: ''
# # Whether the api key should be a query parameter or a header.
# # type: 'query' or 'header'
# http_cache:
# # Automatically generate etags for API responses.
# etag: true
# # Default value for the response max age.
# max_age: 3600
# # Default value for the response shared (proxy) max age.
# shared_max_age: 3600
# # Default values of the "Vary" HTTP header.
# vary: ['Accept']
# # To make all responses public by default.
# public: ~
# invalidation:
# # To enable the tags-based cache invalidation system.
# enabled: false
# # URLs of the Varnish servers to purge using cache tags when a resource is updated.
# varnish_urls: []
# # To pass options to the client charged with the request.
# request_options: []
# mercure:
# # Enabled by default with installed GraphQL
# enabled: false
# # The URL sent in the Link HTTP header. If not set, will default to the URL for MercureBundle's default hub.
# hub_url: null
# messenger:
# # Enabled by default with installed symfony/messenger and not installed symfony/symfony
# enabled: false
# elasticsearch:
# # To enable or disable Elasticsearch support.
# enabled: false
# # The hosts to the Elasticsearch nodes.
# hosts: []
# # The mapping between resource classes and indexes.
# mapping: []
# # The list of exceptions mapped to their HTTP status code.
# exception_to_status:
# # With a status code.
# Symfony\Component\Serializer\Exception\ExceptionInterface: 400
# # Or with a constant defined in the 'Symfony\Component\HttpFoundation\Response' class.
# ApiPlatform\Core\Exception\InvalidArgumentException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST
# ApiPlatform\Core\Exception\FilterValidationException: 400
# Doctrine\ORM\OptimisticLockException: 409
# # ...
# # The list of enabled formats. The first one will be the default.
# formats:
# jsonld:
# mime_types: ['application/ld+json']
# json:
# mime_types: ['application/json']
# html:
# mime_types: ['text/html']
# # ...
# # The list of enabled patch formats. The first one will be the default.
# patch_formats: []
# # The list of enabled error formats. The first one will be the default.
# error_formats:
# jsonproblem:
# mime_types: ['application/problem+json']
# jsonld:
# mime_types: ['application/ld+json']
# # ...
# Exemples :
# App\Entity\Book:
# itemOperations:
# get:
# method: 'GET'
# path: '/grimoire/{id}'
# requirements:
# id: '\d+'
# defaults:
# color: 'brown'
# host: '{subdomain}.api-platform.com'
# schemes: ['https']
# options:
# my_option: 'my_option_value'
# status: 200 # customize the HTTP status code to send
# put:
# method: 'PUT'
# path: '/grimoire/{id}/update'
# hydra_context: { foo: 'bar' }
# requirements:
# id: '\d+'
\ No newline at end of file
framework:
assets:
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
# See the docs at https://github.com/geocoder-php/BazingaGeocoderBundle
bazinga_geocoder:
# The local IP (127.0.0.1) will be replaced by the fake_ip
# see https://github.com/geocoder-php/BazingaGeocoderBundle/blob/5.0.0/Resources/doc/index.md#fake-local-ip
fake_ip: 123.123.123.123
providers:
# cache:
# adapter: mlc_cache_adapter
# provider: factory
# bing_maps:
# api_key: ~ # Required
# locale: ~
# cache:
# adapter: ~ # Required
# provider: ~ # Required
# locale: ~
# lifetime: 86400
# ip_info_db:
# api_key: ~ # Required
# cloudmade:
# api_key: ~ # Required
google_maps:
factory: Bazinga\GeocoderBundle\ProviderFactory\GoogleMapsFactory
options:
# httplug_client: '@httplug.client' # When using HTTPlugBundle
region: 'France'
api_key: 'XXXXXXXXX'
locale: fr
# region: ~
# use_ssl: false
# google_maps_business:
# client_id: ~ # Required
# api_key: ~
# region: ~
# use_ssl: false
openstreetmap:
factory: Bazinga\GeocoderBundle\ProviderFactory\NominatimFactory
locale: fr
# cache: '@Symfony\Component\Cache\Simple\ApcuCache'
# cache_lifetime: 3600
# cache_precision: ~
# host_ip: []
# geoip: []
# free_geo_ip: []
# mapquest:
# api_key: ~ # Required
# oiorest: []
# geocoder_ca: []
# geocoder_us: []
# ign_openls:
# api_key: ~ # Required
# data_science_toolkit: []
# yandex:
# locale: ~
# toponym: ~
# geo_ips:
# api_key: ~
# geo_plugin: []
# maxmind:
# api_key: ~ # Required
# maxmind_binary:
# binary_file: ~ # Required
# open_flag: ~
# chain:
# providers: []
\ No newline at end of file
debug:
# Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser.
# See the "server:dump" command to start a new server.
dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"
services:
EasyCorp\EasyLog\EasyLogHandler:
public: false
arguments: ['%kernel.logs_dir%/%kernel.environment%.log']
#// FIXME: How to add this configuration automatically without messing up with the monolog configuration?
#monolog:
# handlers:
# buffered:
# type: buffer
# handler: easylog
# channels: ['!event']
# level: debug
# easylog:
# type: service
# id: EasyCorp\EasyLog\EasyLogHandler
hautelook_alice:
fixtures_path: fixtures
root_dirs:
- '%kernel.root_dir%'
- '%kernel.project_dir%'
\ No newline at end of file
jms_serializer:
visitors:
json_serialization:
options:
- JSON_PRETTY_PRINT
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]
nelmio_alice:
locale: 'fr_FR'
functions_blacklist:
- 'current'
framework:
router:
strict_requirements: true
# See https://symfony.com/doc/current/email/dev_environment.html
swiftmailer:
# send all emails to a specific address
delivery_addresses: ['julien.jorry@gmail.com']
web_profiler:
toolbar: true
intercept_redirects: false
framework:
profiler: { only_exceptions: false }
parameters:
# Adds a fallback DATABASE_URL if the env var is not set.
# This allows you to run cache:warmup even if your
# environment variables are not available yet.
# You should not need to change this value.
env(DATABASE_URL): ''
doctrine:
dbal:
# configure these for your database server
driver: 'pdo_mysql'
charset: utf8
default_table_options:
charset: utf8
collate: utf8_general_ci
url: '%env(resolve:DATABASE_URL)%'
types:
json: Sonata\Doctrine\Types\JsonType
orm:
auto_generate_proxy_classes: '%kernel.debug%'
entity_managers:
default:
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
mappings:
ApplicationSonataClassificationBundle: ~
SonataClassificationBundle: ~
ApplicationSonataMediaBundle: ~
SonataMediaBundle: ~
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
dql:
string_functions:
str_to_date: App\DQL\StrToDate
numeric_functions:
acos: DoctrineExtensions\Query\Mysql\Acos
cos: DoctrineExtensions\Query\Mysql\Cos
radians: DoctrineExtensions\Query\Mysql\Radians
sin: DoctrineExtensions\Query\Mysql\Sin
filters:
softdeleteable:
class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
enabled: true
doctrine_migrations:
migrations_paths:
'DoctrineMigrations': '%kernel.project_dir%/src/Migrations'
storage:
table_storage:
table_name: 'migration_versions'
# Read the documentation: https://symfony.com/doc/current/bundles/FOSCKEditorBundle/index.html
twig:
form_themes:
- '@FOSCKEditor/Form/ckeditor_widget.html.twig'
fos_ck_editor:
default_config: default
base_path: "build/ckeditor"
js_path: "build/ckeditor/ckeditor.js"
configs:
default:
language: fr
# default toolbar plus Format button
toolbar:
- [Bold, Italic, Underline, -, Cut, Copy, Paste,
PasteText, PasteFromWord, -, Undo, Redo, -,
NumberedList, BulletedList, -, Outdent, Indent, -,
Blockquote, -, Image, Link, Unlink, Table]
- [Format, Maximize, Source]
enterMode: CKEDITOR.ENTER_BR
filebrowserBrowseRoute: admin_sonata_media_media_ckeditor_browser
filebrowserImageBrowseRoute: admin_sonata_media_media_ckeditor_browser
# Display images by default when clicking the image dialog browse button
filebrowserImageBrowseRouteParameters:
provider: sonata.media.provider.image
filebrowserUploadMethod: form
filebrowserUploadRoute: admin_sonata_media_media_ckeditor_upload
filebrowserUploadRouteParameters:
provider: sonata.media.provider.file
# Upload file as image when sending a file from the image dialog
filebrowserImageUploadRoute: admin_sonata_media_media_ckeditor_upload
filebrowserImageUploadRouteParameters:
provider: sonata.media.provider.image
context: default # Optional, to upload in a custom context
#format: my-big # Optional, media format or original size returned to editor
\ No newline at end of file
fos_user:
db_driver: orm
firewall_name: main
user_class: App\Entity\User
from_email:
address: noreply@kohinos.fr
sender_name: Kohinos
service:
mailer: fos_user.mailer.twig_swift
user_manager: sonata.user.orm.user_manager
group:
group_class: App\Entity\Usergroup
group_manager: sonata.user.orm.group_manager # If you're using doctrine orm (use sonata.user.mongodb.group_manager for mongodb)
# registration:
# form:
# type: osp_person_registration
# confirmation:
# enabled: true
# template: OSPUserBundle:Registration:email.txt.twig
\ No newline at end of file
framework:
form: { enabled: true }
templating: { engines: ['twig'] }
secret: '%env(APP_SECRET)%'
#default_locale: en
csrf_protection: true
validation: { enabled: true }
#http_method_override: true
# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
session:
handler_id: ~
#esi: true
#fragments: true
php_errors:
log: true
serializer: { enable_annotations: true }
cache:
# Put the unique name of your app here: the prefix seed
# is used to compute stable namespaces for cache keys.
#prefix_seed: your_vendor_name/app_name
# The app cache caches to the filesystem by default.
# Other options include:
# Redis
#app: cache.adapter.redis
#default_redis_provider: redis://localhost
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
#app: cache.adapter.apcu
hautelook_alice:
fixtures_path: fixtures
root_dirs:
- '%kernel.root_dir%'
- '%kernel.project_dir%'
jms_serializer:
visitors:
xml_serialization:
format_output: '%kernel.debug%'
# metadata:
# auto_detection: false
# directories:
# any-name:
# namespace_prefix: "My\\FooBundle"
# path: "@MyFooBundle/Resources/config/serializer"
# another-name:
# namespace_prefix: "My\\BarBundle"
# path: "@MyBarBundle/Resources/config/serializer"
knp_paginator:
page_range: 5 # number of links showed in the pagination menu (e.g: you have 10 pages, a page_range of 3, on the 5th page you'll see links to page 4, 5, 6)
default_options:
page_name: page # page query parameter name
sort_field_name: sort # sort field query parameter name
sort_direction_name: direction # sort direction query parameter name
distinct: true # ensure distinct results, useful when ORM queries are using GROUP BY statements
filter_field_name: filterField # filter field query parameter name
filter_value_name: filterValue # filter value query parameter name
template:
pagination: '@KnpPaginator/Pagination/twitter_bootstrap_v4_pagination.html.twig' # sliding pagination controls template
sortable: '@KnpPaginator/Pagination/font_awesome_sortable_link.html.twig' # sort link template
filtration: '@KnpPaginator/Pagination/filtration.html.twig' # filters template
\ No newline at end of file
lexik_translation:
fallback_locale: [fr]
managed_locales: [fr,en]
storage:
type: orm
base_layout: "/bundles/LexikTranslationBundle/layout.html.twig"
exporter:
use_yml_tree: true
\ No newline at end of file
liip_imagine:
# valid drivers options include "gd" or "gmagick" or "imagick"
driver: "gd"
# resolvers:
# default:
# web_path:
# web_root: "%kernel.project_dir%/public"
# cache_prefix: "images/cache"
# loaders:
# default:
# filesystem:
# data_root: "%kernel.project_dir%/public/"
# define your filter sets under this option
filter_sets:
# an example thumbnail transformation definition
# https://symfony.com/doc/current/bundles/LiipImagineBundle/basic-usage.html#create-thumbnails
squared_thumbnail:
# set your image quality defaults
jpeg_quality: 85
png_compression_level: 8
# setup the filter steps to apply for this transformation
filters:
# auto rotate the image using EXIF metadata
auto_rotate: ~
# strip the image of all metadata
strip: ~
# scale and square the image to the given dimensions
thumbnail:
size: [250, 250]
mode: outbound
allow_upscale: true
# create border by placing image on larger black background
# background:
# size: [256, 256]
# position: center
# color: '#fff'
# Optional!
# nelmio_api_doc:
# # models: { use_jms: true }
# documentation:
# info:
# title: MLC
# description: Application de gesiton de Monnaie Locale Complémentaire
# version: 2.3.0
# security_definitions:
# api_key:
# type: apiKey
# name: api_key
# in: header
# security:
# api_key: []
# areas: # to filter documented areas
# path_patterns: # an array of regexps
# - ^/api(?!/doc$)
# # host_patterns:
# # - ^api\.
\ No newline at end of file
nelmio_cors:
defaults:
origin_regex: true
# allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
allow_origin: ['*']
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
allow_headers: ['Content-Type', 'Authorization']
expose_headers: ['Link']
max_age: 3600
paths:
'^/': ~
payum:
storages:
App\Entity\Payment: { doctrine: orm }
security:
token_storage:
App\Entity\PaymentToken: { doctrine: orm }
gateways:
offline:
factory: offline
payzen:
factory: payzen
site_id: '%env(PAYZEN_SITE_ID)%'
certificate: '%env(PAYZEN_CERTIFICATE)%' # Clé de TEST ou PRODUCTION
ctx_mode: '%env(PAYZEN_CTX_MODE)%' # TEST ou PRODUCTION
directory: '%kernel.project_dir%/transactions'
debug: '%env(bool:PAYZEN_DEBUG)%'
doctrine:
orm:
metadata_cache_driver:
type: service
id: doctrine.system_cache_provider
query_cache_driver:
type: service
id: doctrine.system_cache_provider
result_cache_driver:
type: service
id: doctrine.result_cache_provider
services:
doctrine.result_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.result_cache_pool'
doctrine.system_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.system_cache_pool'
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system
hautelook_alice:
fixtures_path: fixtures
root_dirs:
- '%kernel.root_dir%'
- '%kernel.project_dir%'
jms_serializer:
visitors:
json_serialization:
options:
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_404s:
# regex: exclude all 404 errors from the logs
- ^/
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
deprecation:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
deprecation_filter:
type: filter
handler: deprecation
max_level: info
channels: ["php"]
main_critical:
type: fingers_crossed
action_level: critical
handler: grouped_critical
grouped_critical:
type: group
members: [streamed_critical, buffered_critical]
streamed_critical:
type: rotating_file
max_files: 10
path: "%kernel.logs_dir%/%kernel.environment%.critical.log"
level: info
buffered_critical:
type: buffer
handler: swift_critical
swift_critical:
type: swift_mailer
from_email: noreply@kohinos.fr
to_email: [julien.jorry@gmail.com, stephan@gelberger.com]
subject: "MLC : PHP Error !"
level: info
framework:
router:
strict_requirements: ~
# security:
# # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
# providers:
# in_memory: { memory: ~ }
# firewalls:
# dev:
# pattern: ^/(_(profiler|wdt)|css|images|js)/
# security: false
# main:
# anonymous: true
# # activate different ways to authenticate
# # http_basic: true
# # https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
# # form_login: true
# # https://symfony.com/doc/current/security/form_login_setup.html
# # Easy way to control access for large sections of your site
# # Note: Only the *first* access control that matches will be used
# access_control:
# # - { path: ^/admin, roles: ROLE_ADMIN }
# # - { path: ^/profile, roles: ROLE_USER }
security:
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
providers:
fos_userbundle:
id: fos_user.user_provider.username_email
in_memory: { memory: ~ }
entity_provider:
entity:
class: App\Entity\User
property: username
api_key_user_provider:
id: App\Security\ApiKeyUserProvider
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
## API WITH JWT AUTH (login/password)
# login:
# pattern: ^/api/login
# stateless: true
# anonymous: true
# provider: api_key_user_provider
# form_login:
# check_path: /api/login_check
# success_handler: lexik_jwt_authentication.handler.authentication_success
# failure_handler: lexik_jwt_authentication.handler.authentication_failure
# require_previous_session: false
# api:
# pattern: ^/api/
# stateless: true
# anonymous: true
# provider: api_key_user_provider
# guard:
# authenticators:
# - lexik_jwt_authentication.jwt_token_authenticator
api:
pattern: ^/api
stateless: true
# can be set to false to disabled API doc available for anonymous user !
anonymous: true
guard:
authenticators:
- App\Security\ApiKeyAuthenticator
provider: api_key_user_provider
main:
pattern: ^/
form_login:
provider: fos_userbundle
login_path: fos_user_security_login
check_path: fos_user_security_check
csrf_token_generator: security.csrf.token_manager
success_handler: redirect.after.login
logout:
path: fos_user_security_logout
target: index
anonymous: true
guard:
authenticators:
- App\Security\EmailTokenAuthenticator
- App\Security\LoginAuthenticator
provider: fos_userbundle
entry_point: App\Security\LoginAuthenticator
remember_me:
secret: "%kernel.secret%"
lifetime: 31536000
path: /
domain: ~
user_provider: fos_userbundle
always_remember_me: true
context: mlc_context
switch_user:
provider: fos_userbundle
# access_denied_handler: App\Security\AccessDeniedHandler
encoders:
# FOS\UserBundle\Model\UserInterface: bcrypt
FOS\UserBundle\Model\UserInterface:
# Use native password encoder
# This value auto-selects the best possible hashing algorithm
# (i.e. Sodium when available).
algorithm: auto
role_hierarchy:
ROLE_API: ROLE_USER
ROLE_ADHERENT: ROLE_USER
ROLE_PRESTATAIRE: ROLE_USER
ROLE_ADMIN_SIEGE: [ROLE_USER, ROLE_ADMIN]
ROLE_REDACTEUR: [ROLE_USER, ROLE_ADMIN]
ROLE_TRESORIER: [ROLE_USER, ROLE_ADMIN]
ROLE_CONTROLEUR: [ROLE_USER, ROLE_ADMIN]
ROLE_GESTION_GROUPE: [ROLE_USER, ROLE_ADMIN]
ROLE_COMPTOIR: [ROLE_USER, ROLE_ADMIN]
ROLE_CONTACT: [ROLE_USER, ROLE_ADMIN]
ROLE_ADMIN: [ROLE_USER, ROLE_SONATA_ADMIN]
ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH, ROLE_API]
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
access_control:
#
# @TODO : better access control !
#
# Admin login page needs to be accessed without credential
# - { path: ^/admin/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
# - { path: ^/admin/logout$, role: IS_AUTHENTICATED_ANONYMOUSLY }
# - { path: ^/admin/login_check$, role: IS_AUTHENTICATED_ANONYMOUSLY }
# - { path: ^/admin/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
# Secured part of the site
# This config requires being logged for the whole site and having the admin role for the admin part.
# Change these rules to adapt them to your needs
# - { path: ^/admin/, role: [ROLE_SUPER_ADMIN, ROLE_SONATA_ADMIN, ROLE_ADMIN_SIEGE, ROLE_REDACTEUR, ROLE_TRESORIER, ROLE_CONTROLEUR, ROLE_GESTION_GROUPE, ROLE_COMPTOIR, ROLE_CONTACT] }
- { path: ^/admin/, role: [ROLE_ADMIN] }
# Bottom line can be uncommented to disabled API doc available for anonymous user !
# - { path: '^/api', roles: ROLE_API }
- { path: ^/.*, role: IS_AUTHENTICATED_ANONYMOUSLY }
services:
SensioLabs\Security\SecurityChecker:
public: false
SensioLabs\Security\Command\SecurityCheckerCommand:
arguments: ['@SensioLabs\Security\SecurityChecker']
public: false
tags:
- { name: console.command, command: 'security:check' }
sensio_framework_extra:
router:
annotations: false
sonata_user:
security_acl: false
manager_type: orm # can be orm or mongodb
class:
user: App\Entity\User
group: App\Entity\Usergroup
profile:
default_avatar: 'bundles/sonatauser/default_avatar.png' # Default avatar displayed if the user doesn't have one
admin: # Admin Classes
user:
class: App\Application\Sonata\UserBundle\Admin\UserAdmin
controller: App\Controller\CRUD\CRUDController
translation: SonataUserBundle
group:
class: App\Application\Sonata\UserBundle\Admin\GroupAdmin
controller: App\Controller\CRUD\GroupCRUDController
translation: SonataUserBundle
impersonating:
route: index
sonata_block:
default_contexts: [sonata_page_bundle]
blocks:
# sonata.block.service.text:
# contexts: [admin]
# sonata.admin.block.stats:
# contexts: [admin]
sonata.admin.block.admin_list:
contexts: [admin]
# sonata.admin.block.search_result:
# contexts: [admin]
# sonata.formatter.block.formatter:
# contexts: [admin]
admin.block.dashboard:
contexts: [admin]
sonata_formatter:
default_formatter: text
formatters:
text:
service: sonata.formatter.text.text
extensions:
- sonata.formatter.twig.control_flow
- sonata.formatter.twig.gist
ckeditor:
templates:
browser: '@SonataFormatter/Ckeditor/browser.html.twig'
upload: '@SonataFormatter/Ckeditor/upload.html.twig'
sonata_classification:
class:
category: App\Application\Sonata\ClassificationBundle\Entity\Category
collection: App\Application\Sonata\ClassificationBundle\Entity\Collection
context: App\Application\Sonata\ClassificationBundle\Entity\Context
tag: App\Application\Sonata\ClassificationBundle\Entity\Tag
media: App\Application\Sonata\MediaBundle\Entity\Media
sonata_core:
form:
mapping:
enabled: false
sonata_media:
db_driver: doctrine_orm
class:
media: App\Application\Sonata\MediaBundle\Entity\Media
category: App\Application\Sonata\ClassificationBundle\Entity\Category
gallery: App\Application\Sonata\MediaBundle\Entity\Gallery
gallery_has_media: App\Application\Sonata\MediaBundle\Entity\GalleryHasMedia
default_context: default
contexts:
default:
providers:
- sonata.media.provider.dailymotion
- sonata.media.provider.youtube
- sonata.media.provider.image
- sonata.media.provider.file
- sonata.media.provider.vimeo
formats:
small: { width: 100 , quality: 70}
big: { width: 500 , quality: 70}
actualites:
providers:
- sonata.media.provider.youtube
- sonata.media.provider.image
formats:
small: { width: 100 , quality: 95}
big: { width: 500 , quality: 90}
document:
providers:
- sonata.media.provider.file
import:
providers:
- sonata.media.provider.csv
comptoir:
providers:
- sonata.media.provider.image
formats:
small: { width: 100 , quality: 95}
big: { width: 500 , quality: 90}
groupe:
providers:
- sonata.media.provider.image
formats:
small: { width: 100 , quality: 95}
big: { width: 500 , quality: 90}
rubrique:
providers:
- sonata.media.provider.image
formats:
preview: { width: 50, quality: 90}
small: { width: 100 , quality: 90}
big: { width: 400 , quality: 90}
prestataire:
providers:
- sonata.media.provider.image
- sonata.media.provider.file
formats:
small: { width: 100 , quality: 95}
big: { width: 500 , quality: 90}
faq:
providers:
- sonata.media.provider.image
- sonata.media.provider.file
formats:
small: { width: 100 , quality: 95}
big: { width: 500 , quality: 90}
cdn:
server:
path: /upload/media
filesystem:
local:
# Directory for uploads should be writable
directory: "%kernel.project_dir%/public/upload/media"
create: false
sonata_admin:
assets:
extra_stylesheets:
- bundles/sonatatranslation/css/sonata-translation.css
sonata_block:
blocks:
sonata_translation.block.locale_switcher: ~
sonata_translation:
locale_switcher: true
locales: ['en', 'fr']
default_locale: 'fr'
gedmo:
enabled: true
knplabs:
enabled: true
# Read the documentation: https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html
# See the official DoctrineExtensions documentation for more details: https://github.com/Atlantic18/DoctrineExtensions/tree/master/doc/
stof_doctrine_extensions:
default_locale: en_US
orm:
default:
sortable: true
timestampable: true
sluggable: true
softdeleteable: true
\ No newline at end of file
swiftmailer:
url: '%env(MAILER_URL)%'
spool: { type: 'memory' }
framework:
# ide: 'myide://open?url=file://%%f&line=%%l'
ide: sublime
test: true
session:
storage_id: session.storage.mock_file
imports:
- { resource: ../dev/hautelook_alice.yaml }
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]
imports:
- { resource: ../dev/nelmio_alice.yaml }
framework:
router:
strict_requirements: true
security:
firewalls:
# replace 'main' by the name of your own firewall
main:
http_basic: ~
provider: fos_userbundle
\ No newline at end of file
swiftmailer:
disable_delivery: true
web_profiler:
toolbar: false
intercept_redirects: false
framework:
profiler: { collect: false }
framework:
# default_locale: '%locale%'
default_locale: 'fr'
translator:
default_path: '%kernel.project_dir%/translations'
fallbacks:
# - '%locale%'
- 'fr'
- 'en'
twig:
default_path: '%kernel.project_dir%/templates'
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'
form_themes:
- 'bootstrap_4_layout.html.twig'
- '@SonataFormatter/Form/formatter.html.twig'
- 'rubrique/media_widgets.html.twig'
\ No newline at end of file
services:
_defaults:
public: false
autowire: true
autoconfigure: true
# Uncomment any lines below to activate that Twig extension
#Twig\Extensions\ArrayExtension: ~
#Twig\Extensions\DateExtension: ~
#Twig\Extensions\IntlExtension: ~
#Twig\Extensions\TextExtension: ~
framework:
validation:
email_validation_mode: html5
vich_uploader:
db_driver: orm
mappings:
annonce:
uri_prefix: /images/annonces
upload_destination: '%kernel.project_dir%/public/images/annonces'
# delete_on_update: true
# delete_on_remove: true
logo:
uri_prefix: /images/logo
upload_destination: '%kernel.project_dir%/public/images/logo'
# delete_on_update: true
# delete_on_remove: true
\ No newline at end of file
webpack_encore:
# The path where Encore is building the assets.
# This should match Encore.setOutputPath() in webpack.config.js.
output_path: '%kernel.project_dir%/public/build'
# This file is the entry point to configure your own HTTP routes.
# Files in the routes/ subdirectory configure the routes for your dependencies.
#index:
# path: /
# controller: App\Controller\DefaultController::index
sonata_user_admin_security:
resource: '@SonataUserBundle/Resources/config/routing/admin_security.xml'
prefix: /admin
sonata_user_admin_resetting:
resource: '@SonataUserBundle/Resources/config/routing/admin_resetting.xml'
prefix: /admin/resetting
fos_user:
resource: "@FOSUserBundle/Resources/config/routing/all.xml"
sonata_translation:
resource: '@SonataTranslationBundle/Resources/config/routes.yaml'
lexik_translation_edition:
resource: "@LexikTranslationBundle/Resources/config/routing.yml"
prefix: /admin
authentication_token:
path: /api/authentication_token
methods: ['POST']
app.swagger_ui:
path: /api/doc
methods: GET
defaults: { _controller: nelmio_api_doc.controller.swagger_ui }
payum_all:
resource: "@PayumBundle/Resources/config/routing/all.xml"
controllers:
resource: ../../src/Controller/
type: annotation
# rest_controllers:
# resource: ../../src/Controller/Rest/
# type: annotation
# prefix: /api
api_platform:
resource: .
type: api_platform
prefix: /api
_errors:
resource: '@TwigBundle/Resources/config/routing/errors.xml'
prefix: /_error
web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt
web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler
_liip_imagine:
resource: "@LiipImagineBundle/Resources/config/routing.yaml"
# Expose your documentation as JSON swagger compliant
app.swagger:
path: /api/doc.json
methods: GET
defaults: { _controller: nelmio_api_doc.controller.swagger }
## Requires the Asset component and the Twig bundle
## $ composer require twig asset
#app.swagger_ui:
# path: /api/doc
# methods: GET
# defaults: { _controller: nelmio_api_doc.controller.swagger_ui }
admin_area:
resource: "@SonataAdminBundle/Resources/config/routing/sonata_admin.xml"
prefix: /admin
_sonata_admin:
resource: .
type: sonata_admin
prefix: /admin
sonata_media_gallery:
resource: '@SonataMediaBundle/Resources/config/routing/gallery.xml'
prefix: /media/gallery
sonata_media:
resource: '@SonataMediaBundle/Resources/config/routing/media.xml'
prefix: /media
<?php
namespace Ekyna\Component\Payum\Payzen\Action\Api;
use Ekyna\Component\Payum\Payzen\Api\Api;
use Payum\Core\Action\ActionInterface;
use Payum\Core\ApiAwareInterface;
use Payum\Core\Exception\UnsupportedApiException;
use Payum\Core\GatewayAwareInterface;
use Payum\Core\GatewayAwareTrait;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface;
/**
* Class AbstractApiAction
* @package Ekyna\Component\Payum\Payzen\Action\Api
* @author Etienne Dauvergne <contact@ekyna.com>
*/
abstract class AbstractApiAction implements ActionInterface, GatewayAwareInterface, ApiAwareInterface, LoggerAwareInterface
{
use GatewayAwareTrait;
/**
* @var Api
*/
protected $api;
/**
* @var LoggerInterface
*/
private $logger;
/**
* @inheritDoc
*/
public function setApi($api)
{
if (false == $api instanceof Api) {
throw new UnsupportedApiException('Not supported.');
}
$this->api = $api;
}
/**
* {@inheritDoc}
*/
public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;
}
/**
* Logs the given message.
*
* @param string $message
*/
protected function log($message)
{
if (!$this->logger) {
return;
}
$this->logger->debug($message);
}
/**
* Logs the given message and data.
*
* @param string $message
* @param array $data
* @param array $filterKeys
*/
protected function logData($message, array $data, array $filterKeys = [])
{
if (!$this->logger) {
return;
}
if (!empty($filterKeys)) {
$data = array_intersect_key($data, array_flip($filterKeys));
}
$data = array_map(function($key, $value) {
return "$key: $value";
}, array_keys($data), $data);
$this->logger->debug($message . ': ' . implode(', ', $data));
}
}
<?php
namespace Ekyna\Component\Payum\Payzen\Action\Api;
use Ekyna\Component\Payum\Payzen\Request\Request;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\Exception\RequestNotSupportedException;
use Payum\Core\Reply\HttpRedirect;
/**
* Class RequestAction
* @package Ekyna\Component\Payum\Payzen\Action\Api
* @author Etienne Dauvergne <contact@ekyna.com>
*/
class ApiRequestAction extends AbstractApiAction
{
/**
* @inheritdoc
*
* @throws \Payum\Core\Reply\HttpRedirect
*/
public function execute($request)
{
/** @var Request $request */
RequestNotSupportedException::assertSupports($this, $request);
$model = ArrayObject::ensureArrayObject($request->getModel());
if ($model['vads_trans_id']) {
return;
}
$model['vads_trans_id'] = $this->api->getTransactionId();
// Current UTC date time
$model['vads_trans_date'] = (new \DateTime('now', new \DateTimeZone('UTC')))->format('YmdHis');
$data = $model->getArrayCopy();
$this->logRequestData($data);
$url = $this->api->createRequestUrl($data);
throw new HttpRedirect($url);
}
/**
* Logs the request data.
*
* @param array $data
*/
private function logRequestData(array $data)
{
$this->logData("[Payzen] Request", $data, [
'vads_order_id',
'vads_amount',
'vads_ctx_mode',
'vads_currency',
'vads_payment_config',
'vads_site_id',
'vads_trans_date',
'vads_trans_id',
'vads_version',
]);
}
/**
* @inheritdoc
*/
public function supports($request)
{
return $request instanceof Request
&& $request->getModel() instanceof \ArrayAccess;
}
}
<?php
namespace Ekyna\Component\Payum\Payzen\Action\Api;
use Ekyna\Component\Payum\Payzen\Request\Response;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\Exception\RequestNotSupportedException;
use Payum\Core\Request\GetHttpRequest;
/**
* Class ResponseAction
* @package Ekyna\Component\Payum\Payzen\Action\Api
* @author Etienne Dauvergne <contact@ekyna.com>
*/
class ApiResponseAction extends AbstractApiAction
{
/**
* @inheritdoc
*/
public function execute($request)
{
/** @var Response $request */
RequestNotSupportedException::assertSupports($this, $request);
$model = ArrayObject::ensureArrayObject($request->getModel());
$this->gateway->execute($httpRequest = new GetHttpRequest());
if (isset($httpRequest->request['vads_result'])) {
$data = $httpRequest->request;
} elseif (isset($httpRequest->query['vads_result'])) {
$data = $httpRequest->query;
} else {
return;
}
$this->logResponseData($data);
// Check amount
if ($model['vads_amount'] != $data['vads_amount']) {
return;
}
// Check the response signature
if ($this->api->checkResponseIntegrity($data)) {
// Update the payment details
$model->replace($data);
$request->setModel($model);
}
}
/**
* Logs the response data.
*
* @param array $data
*/
private function logResponseData(array $data)
{
$this->logData("[Payzen] Response", $data, [
'vads_order_id',
'vads_trans_id',
'vads_amount',
'vads_auth_result',
'vads_auth_mode',
'vads_auth_number',
'vads_validation_mode',
'vads_result',
'vads_extra_result',
'vads_warranty_result',
]);
}
/**
* @inheritdec
*/
public function supports($request)
{
return $request instanceof Response
&& $request->getModel() instanceof \ArrayAccess;
}
}
<?php
namespace Ekyna\Component\Payum\Payzen\Action;
use Ekyna\Component\Commerce\Bridge\Payum\Request\GetHumanStatus;
use Payum\Core\Action\ActionInterface;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\Exception\RequestNotSupportedException;
use Payum\Core\GatewayAwareInterface;
use Payum\Core\GatewayAwareTrait;
use Payum\Core\Request\Cancel;
/**
* Class CancelAction
* @package Ekyna\Component\Payum\Payzen\Action
* @author Etienne Dauvergne <contact@ekyna.com>
*/
class CancelAction implements ActionInterface, GatewayAwareInterface
{
use GatewayAwareTrait;
/**
* {@inheritdoc}
*
* @param Cancel $request
*/
public function execute($request)
{
RequestNotSupportedException::assertSupports($this, $request);
$model = ArrayObject::ensureArrayObject($request->getModel());
$this->gateway->execute($status = new GetHumanStatus($model));
if ($status->isNew()) {
$model['state_override'] = 'canceled';
}
}
/**
* {@inheritdoc}
*/
public function supports($request)
{
return $request instanceof Cancel
&& $request->getModel() instanceof \ArrayAccess;
}
}
<?php
namespace Ekyna\Component\Payum\Payzen\Action;
use Ekyna\Component\Payum\Payzen\Request\Request;
use Payum\Core\Action\ActionInterface;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\Exception\RequestNotSupportedException;
use Payum\Core\GatewayAwareInterface;
use Payum\Core\GatewayAwareTrait;
use Payum\Core\Request\Capture;
use Payum\Core\Request\Sync;
use Payum\Core\Security\GenericTokenFactoryAwareInterface;
use Payum\Core\Security\GenericTokenFactoryAwareTrait;
/**
* Class CaptureAction
* @package Ekyna\Component\Payum\Payzen\Action
* @author Etienne Dauvergne <contact@ekyna.com>
*/
class CaptureAction implements ActionInterface, GatewayAwareInterface, GenericTokenFactoryAwareInterface
{
use GatewayAwareTrait;
use GenericTokenFactoryAwareTrait;
/**
* {@inheritdoc}
*
* @param Capture $request
*/
public function execute($request)
{
RequestNotSupportedException::assertSupports($this, $request);
$model = ArrayObject::ensureArrayObject($request->getModel());
if ($request->getToken()) {
// Done redirections
$targetUrl = $request->getToken()->getTargetUrl();
// Symfony generates http url: force use of https
$targetUrl = preg_replace('/^http:/', 'https:', $targetUrl);
$doneUrlFields = [
'vads_url_cancel', // Annuler et retourner à la boutique
'vads_url_error', // Erreur de traitement interne
'vads_url_referral', // 02 contacter l'émetteur de la carte
'vads_url_refused', // Refus autre que 02
'vads_url_success', // 00 Success
'vads_url_return', // Retour à la boutique
];
foreach ($doneUrlFields as $field) {
if (false == $model[$field]) {
$model[$field] = $targetUrl;
}
}
// Notify url
if (empty($model['vads_url_check']) && $this->tokenFactory) {
// Custom action ; force use of https
$afterUrl = preg_replace('/^http:/', 'https:', $request->getToken()->getAfterUrl());
$model['vads_url_check'] = $afterUrl;
}
}
if (false == $model['vads_trans_id']) {
$this->gateway->execute(new Request($model));
}
$this->gateway->execute(new Sync($model));
}
/**
* {@inheritdoc}
*/
public function supports($request)
{
return $request instanceof Capture
&& $request->getModel() instanceof \ArrayAccess;
}
}
<?php
namespace Ekyna\Component\Payum\Payzen\Action;
use Payum\Core\Action\ActionInterface;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\Exception\RequestNotSupportedException;
use Payum\Core\Exception\RuntimeException;
use Payum\Core\GatewayAwareInterface;
use Payum\Core\GatewayAwareTrait;
use Payum\Core\Model\PaymentInterface;
use Payum\Core\Request\Convert;
use Payum\Core\Request\GetCurrency;
/**
* Class ConvertPaymentAction
* @package Ekyna\Component\Payum\Payzen\Action
* @author Etienne Dauvergne <contact@ekyna.com>
*/
class ConvertPaymentAction implements ActionInterface, GatewayAwareInterface
{
use GatewayAwareTrait;
/**
* {@inheritDoc}
*
* @param Convert $request
*/
public function execute($request)
{
RequestNotSupportedException::assertSupports($this, $request);
/** @var PaymentInterface $payment */
$payment = $request->getSource();
$model = ArrayObject::ensureArrayObject($payment->getDetails());
if (false == $model['vads_amount']) {
$this->gateway->execute($currency = new GetCurrency($payment->getCurrencyCode()));
if (2 < $currency->exp) {
throw new RuntimeException('Unexpected currency exp.');
}
$divisor = pow(10, 2 - $currency->exp);
$model['vads_currency'] = (string)$currency->numeric;
$model['vads_amount'] = (string)abs($payment->getTotalAmount() / $divisor);
}
if (false == $model['vads_order_id']) {
$model['vads_order_id'] = $payment->getNumber();
}
if (false == $model['vads_cust_id']) {
$model['vads_cust_id'] = $payment->getClientId();
}
if (false == $model['vads_cust_email']) {
$model['vads_cust_email'] = $payment->getClientEmail();
}
$request->setResult((array)$model);
}
/**
* {@inheritDoc}
*/
public function supports($request)
{
return $request instanceof Convert
&& $request->getSource() instanceof PaymentInterface
&& $request->getTo() == 'array';
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment