-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1169425252 - RedirectionHistory recipe
- Loading branch information
1 parent
8a476b0
commit e3f73a0
Showing
7 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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%/" | ||
} | ||
} |
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
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> |
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
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
20
faros-ng/seo-bundle/3.7/src/Entity/Seo/RedirectionHistory.php
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
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; | ||
} |
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
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; | ||
} |
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
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; | ||
} |