Commit d26f57b5 authored by Mat's avatar Mat

Ajoute stof/doctrine-extensions-bundle, config et annote un attribut slug

parent 092adf2c
......@@ -22,6 +22,7 @@ class AppKernel extends Kernel
new JMS\SerializerBundle\JMSSerializerBundle(),
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
new Vich\UploaderBundle\VichUploaderBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
......
......@@ -99,3 +99,9 @@ vich_uploader:
legume_images:
uri_prefix: '%app.path.legume_images%'
upload_destination: '%kernel.root_dir%/../web/uploads/images/legumes'
# Stof\DoctrineExtensionsBundle configuration
stof_doctrine_extensions:
orm:
default:
sluggable: true
\ No newline at end of file
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "bddd0ec40e25816f1e7988b1f6a2d09c",
"content-hash": "5ef27ac453236c22b49a7d30048e6593",
"packages": [
{
"name": "behat/transliterator",
"version": "v1.2.0",
"source": {
"type": "git",
"url": "https://github.com/Behat/Transliterator.git",
"reference": "826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Behat/Transliterator/zipball/826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c",
"reference": "826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"chuyskywalker/rolling-curl": "^3.1",
"php-yaoi/php-yaoi": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
}
},
"autoload": {
"psr-0": {
"Behat\\Transliterator": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Artistic-1.0"
],
"description": "String transliterator",
"keywords": [
"i18n",
"slug",
"transliterator"
],
"time": "2017-04-04T11:38:05+00:00"
},
{
"name": "composer/ca-bundle",
"version": "1.1.1",
......@@ -1024,6 +1068,87 @@
],
"time": "2018-03-08T08:59:27+00:00"
},
{
"name": "gedmo/doctrine-extensions",
"version": "v2.4.35",
"source": {
"type": "git",
"url": "https://github.com/Atlantic18/DoctrineExtensions.git",
"reference": "1e400fbd05b7e5f912f55fe95805450f7d3bed60"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Atlantic18/DoctrineExtensions/zipball/1e400fbd05b7e5f912f55fe95805450f7d3bed60",
"reference": "1e400fbd05b7e5f912f55fe95805450f7d3bed60",
"shasum": ""
},
"require": {
"behat/transliterator": "~1.2",
"doctrine/common": "~2.4",
"php": ">=5.3.2"
},
"conflict": {
"doctrine/annotations": "<1.2"
},
"require-dev": {
"doctrine/common": ">=2.5.0",
"doctrine/mongodb-odm": ">=1.0.2",
"doctrine/orm": ">=2.5.0",
"phpunit/phpunit": "^4.8.35|^5.7|^6.5",
"symfony/yaml": "~2.6|~3.0|~4.0"
},
"suggest": {
"doctrine/mongodb-odm": "to use the extensions with the MongoDB ODM",
"doctrine/orm": "to use the extensions with the ORM"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.4.x-dev"
}
},
"autoload": {
"psr-4": {
"Gedmo\\": "lib/Gedmo"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "David Buchmann",
"email": "david@liip.ch"
},
{
"name": "Gediminas Morkevicius",
"email": "gediminas.morkevicius@gmail.com"
},
{
"name": "Gustavo Falco",
"email": "comfortablynumb84@gmail.com"
}
],
"description": "Doctrine2 behavioral extensions",
"homepage": "http://gediminasm.org/",
"keywords": [
"Blameable",
"behaviors",
"doctrine2",
"extensions",
"gedmo",
"loggable",
"nestedset",
"sluggable",
"sortable",
"timestampable",
"translatable",
"tree",
"uploadable"
],
"time": "2018-05-08T12:28:40+00:00"
},
{
"name": "hirak/prestissimo",
"version": "0.3.7",
......@@ -2049,6 +2174,71 @@
"description": "A security checker for your composer.lock",
"time": "2018-02-28T22:10:01+00:00"
},
{
"name": "stof/doctrine-extensions-bundle",
"version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/stof/StofDoctrineExtensionsBundle.git",
"reference": "46db71ec7ffee9122eca3cdddd4ef8d84bae269c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/stof/StofDoctrineExtensionsBundle/zipball/46db71ec7ffee9122eca3cdddd4ef8d84bae269c",
"reference": "46db71ec7ffee9122eca3cdddd4ef8d84bae269c",
"shasum": ""
},
"require": {
"gedmo/doctrine-extensions": "^2.3.4",
"php": ">=5.3.2",
"symfony/framework-bundle": "~2.7|~3.2|~4.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^4.0",
"symfony/security-bundle": "^2.7 || ^3.2 || ^4.0"
},
"suggest": {
"doctrine/doctrine-bundle": "to use the ORM extensions",
"doctrine/mongodb-odm-bundle": "to use the MongoDB ODM extensions"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
}
},
"autoload": {
"psr-4": {
"Stof\\DoctrineExtensionsBundle\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Christophe Coevoet",
"email": "stof@notk.org"
}
],
"description": "Integration of the gedmo/doctrine-extensions with Symfony2",
"homepage": "https://github.com/stof/StofDoctrineExtensionsBundle",
"keywords": [
"behaviors",
"doctrine2",
"extensions",
"gedmo",
"loggable",
"nestedset",
"sluggable",
"sortable",
"timestampable",
"translatable",
"tree"
],
"time": "2017-12-24T16:06:50+00:00"
},
{
"name": "swiftmailer/swiftmailer",
"version": "v5.4.9",
......
File mode changed from 100644 to 100755
......@@ -3,6 +3,7 @@
namespace PotageBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Groupe
......@@ -43,6 +44,7 @@ class Groupe
private $nom;
/**
* @Gedmo\Slug(fields={"nom"})
* @ORM\Column(length=128, unique=true)
*/
private $slug;
......
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