Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1169425252 - RedirectionHistory recipe #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions faros-ng/seo-bundle/3.7/config/packages/faros_seo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
faros_seo:
redirection:
enable: true
exclude_patterns:
- ^/admin
- ^/api
- ^/assets
- ^/bundles
- ^/build
- ^/translations
- ^/js
- ^/image
- ^/media
- ^/_profiler
rewrite_redirect: false
redirection_class: App\Entity\Seo\Redirection
redirection_history_class: App\Entity\Seo\RedirectionHistory
redirection_history_save_path: '%kernel.project_dir%/var/history'
rule_class: App\Entity\Seo\Rule
rule_exception_class: App\Entity\Seo\RuleException
9 changes: 9 additions & 0 deletions faros-ng/seo-bundle/3.7/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"bundles": {
"Faros\\Bundle\\SeoBundle\\FarosSeoBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
}
7 changes: 7 additions & 0 deletions faros-ng/seo-bundle/3.7/post-install.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<bg=blue;fg=white> </>
<bg=blue;fg=white> What's next? </>
<bg=blue;fg=white> </>

* <fg=blue>Update</> your database schema:
1. <comment>php bin/console doctrine:migrations:diff</comment>
2. <comment>php bin/console doctrine:migrations:migrate</comment>
20 changes: 20 additions & 0 deletions faros-ng/seo-bundle/3.7/src/Entity/Seo/Redirection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace App\Entity\Seo;

use Doctrine\ORM\Mapping as ORM;
use Faros\Bundle\SeoBundle\Repository\RedirectionRepository;
use Faros\Component\Seo\Model\Redirection as RedirectionModel;

#[ORM\Entity(repositoryClass: RedirectionRepository::class)]
#[ORM\Table(name: 'seo_redirection')]
class Redirection extends RedirectionModel
{
/**
* @var int|null
*/
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
protected $id;
}
20 changes: 20 additions & 0 deletions faros-ng/seo-bundle/3.7/src/Entity/Seo/RedirectionHistory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace App\Entity\Seo;

use Doctrine\ORM\Mapping as ORM;
use Faros\Bundle\SeoBundle\Repository\RedirectionHistoryRepository;
use Faros\Component\Seo\Model\RedirectionHistory as RedirectionHistoryModel;

#[ORM\Entity(repositoryClass: RedirectionHistoryRepository::class)]
#[ORM\Table(name: 'seo_redirection_history')]
class RedirectionHistory extends RedirectionHistoryModel
{
/**
* @var int|null
*/
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
protected $id;
}
27 changes: 27 additions & 0 deletions faros-ng/seo-bundle/3.7/src/Entity/Seo/Rule.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace App\Entity\Seo;

use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Faros\Bundle\SeoBundle\Repository\RuleRepository;
use Faros\Component\Seo\Model\Rule as RuleModel;

#[ORM\Entity(repositoryClass: RuleRepository::class)]
#[ORM\Table(name: 'seo_rule')]
class Rule extends RuleModel
{
/**
* @var int|null
*/
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
protected $id;

/**
* @var Collection<int, RuleException>
*/
#[ORM\OneToMany(targetEntity: RuleException::class, mappedBy: 'rule')]
protected $exceptions;
}
25 changes: 25 additions & 0 deletions faros-ng/seo-bundle/3.7/src/Entity/Seo/RuleException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace App\Entity\Seo;

use Doctrine\ORM\Mapping as ORM;
use Faros\Component\Seo\Model\RuleException as RuleExceptionModel;

#[ORM\Entity]
#[ORM\Table(name: 'seo_rule_exception')]
class RuleException extends RuleExceptionModel
{
/**
* @var int|null
*/
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
protected $id;

/**
* @var Rule|null
*/
#[ORM\ManyToOne(targetEntity: Rule::class, inversedBy: 'exceptions')]
protected $rule;
}