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
/* /!\ Since Chicane https://github.com/swan-io/chicane has a hard dependence to React, | |
* We cannot share it with our backend. That why we reuse some part of the code without React | |
* to generate links for the backend. | |
* See our issue https://github.com/swan-io/chicane/issues/33 | |
*/ | |
import { createPath, parsePath } from 'history'; | |
// From https://github.com/swan-io/chicane/blob/main/src/types.ts | |
type Search = Record<string, string | string[]>; | |
type Params = Record<string, string | string[] | undefined>; |
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
### Keybase proof | |
I hereby claim: | |
* I am nightbr on github. | |
* I am nightb (https://keybase.io/nightb) on keybase. | |
* I have a public key ASBJqhWUsWBY0ZlEbDygAuoLilzDcB45c0SWYTPwreWubAo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\EventListener; | |
use App\Entity\Locale; | |
use App\Repository\LocaleRepository; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use Symfony\Component\HttpKernel\KernelEvents; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
use Symfony\Component\HttpKernel\Event\FilterResponseEvent; |
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\Entity\Translation; | |
use Doctrine\ORM\Mapping as ORM; | |
use Gedmo\Translatable\Entity\MappedSuperclass\AbstractTranslation; | |
/** | |
* @ORM\Table(name="company_translations", indexes={ | |
* @ORM\Index(name="company_translation_idx", columns={"locale", "object_class", "field", "foreign_key"}) | |
* }) |
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\Entity; | |
use ApiPlatform\Core\Annotation\ApiResource; | |
use ApiPlatform\Core\Annotation\ApiSubresource; | |
use Doctrine\ORM\Mapping as ORM; | |
use Gedmo\Mapping\Annotation as Gedmo; | |
use Symfony\Component\Validator\Constraints as Assert; | |
use Symfony\Component\Serializer\Annotation\MaxDepth; |
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\Repository; | |
use App\Entity\Locale; | |
use Doctrine\ORM\EntityManager; | |
use Doctrine\ORM\EntityRepository; | |
final class LocaleRepository | |
{ |
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\Entity; | |
use ApiPlatform\Core\Annotation\ApiResource; | |
use Doctrine\ORM\Mapping as ORM; | |
use Symfony\Component\Validator\Constraints as Assert; | |
use Symfony\Component\Serializer\Annotation\Groups; | |
/** | |
* Locale | |
* | |
* @ApiResource( |
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
parameters: | |
locale: en | |
availableLocales: | |
- en | |
- fr |
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
.tmp | |
.git | |
docker-compose.yml | |
Dockerfile |
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
server { | |
listen 80; | |
server_name _; | |
charset utf-8; | |
root /var/www/html/web; | |
index index.php index.html index.htm; | |
location / { | |
try_files $uri @rewriteapp; |
NewerOlder