-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #862 from City-of-Helsinki/UHF-10539
UHF-10539: Unpublishable redirects
- Loading branch information
Showing
16 changed files
with
1,395 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
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
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,21 @@ | ||
# Publishable redirects | ||
|
||
This module alters [redirect entity type](../src/Entity/PublishableRedirect.php) from | ||
[`redirect` module](https://www.drupal.org/project/redirect) | ||
so that it implements EntityPublishedInterface and has | ||
`is_custom` field. | ||
|
||
The redirect entities added or updated by any user from through the | ||
entity from are automatically permanently marked as custom, while | ||
redirects created automatically are not custom. | ||
|
||
If enabled, a cron job unpublished non-custom redirect entities that | ||
are more than 6 months old. Enable the feature with: | ||
|
||
```php | ||
\Drupal::configFactory() | ||
->getEditable('helfi_platform_config.redirect_cleaner') | ||
->set('enable', TRUE) | ||
->save(); | ||
``` | ||
|
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
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
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
Oops, something went wrong.