diff --git a/.idea/oliverdavies-uk.iml b/.idea/oliverdavies-uk.iml
index 82132bb..8863a90 100644
--- a/.idea/oliverdavies-uk.iml
+++ b/.idea/oliverdavies-uk.iml
@@ -35,10 +35,13 @@
+
+
+
@@ -48,6 +51,7 @@
+
@@ -80,6 +84,7 @@
+
diff --git a/.idea/php.xml b/.idea/php.xml
index 8d668da..9e95006 100644
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -86,6 +86,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/composer.json b/composer.json
index e69b8bc..17e3be2 100644
--- a/composer.json
+++ b/composer.json
@@ -30,6 +30,7 @@
"drupal/speakerdeck_field": "^1.0",
"drupal/xmlsitemap": "^1.0",
"drush/drush": "^9",
+ "illuminate/support": "^7.10",
"tightenco/collect": "^6.15"
},
"require-dev": {
diff --git a/composer.lock b/composer.lock
index d94fa0a..cc68f43 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "048aa398777f70ad3f8d134435feee84",
+ "content-hash": "dceeba48acb17e26cea911e8c13e135a",
"packages": [
{
"name": "asm89/stack-cors",
@@ -3381,6 +3381,112 @@
],
"time": "2019-07-01T23:21:34+00:00"
},
+ {
+ "name": "illuminate/contracts",
+ "version": "v7.10.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/illuminate/contracts.git",
+ "reference": "5681c90368ffafaaa2e12c42112e344281466f23"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/illuminate/contracts/zipball/5681c90368ffafaaa2e12c42112e344281466f23",
+ "reference": "5681c90368ffafaaa2e12c42112e344281466f23",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2.5",
+ "psr/container": "^1.0",
+ "psr/simple-cache": "^1.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "7.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Illuminate\\Contracts\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Taylor Otwell",
+ "email": "taylor@laravel.com"
+ }
+ ],
+ "description": "The Illuminate Contracts package.",
+ "homepage": "https://laravel.com",
+ "time": "2020-05-06T13:37:50+00:00"
+ },
+ {
+ "name": "illuminate/support",
+ "version": "v7.10.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/illuminate/support.git",
+ "reference": "cd11fa914c52a2249c48cde08d03a871597e8781"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/illuminate/support/zipball/cd11fa914c52a2249c48cde08d03a871597e8781",
+ "reference": "cd11fa914c52a2249c48cde08d03a871597e8781",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/inflector": "^1.1",
+ "ext-json": "*",
+ "ext-mbstring": "*",
+ "illuminate/contracts": "^7.0",
+ "nesbot/carbon": "^2.17",
+ "php": "^7.2.5",
+ "voku/portable-ascii": "^1.4.8"
+ },
+ "conflict": {
+ "tightenco/collect": "<5.5.33"
+ },
+ "suggest": {
+ "illuminate/filesystem": "Required to use the composer class (^7.0).",
+ "moontoast/math": "Required to use ordered UUIDs (^1.1).",
+ "ramsey/uuid": "Required to use Str::uuid() (^3.7|^4.0).",
+ "symfony/process": "Required to use the composer class (^5.0).",
+ "symfony/var-dumper": "Required to use the dd function (^5.0).",
+ "vlucas/phpdotenv": "Required to use the Env class and env helper (^4.0)."
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "7.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Illuminate\\Support\\": ""
+ },
+ "files": [
+ "helpers.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Taylor Otwell",
+ "email": "taylor@laravel.com"
+ }
+ ],
+ "description": "The Illuminate Support package.",
+ "homepage": "https://laravel.com",
+ "time": "2020-05-05T16:21:56+00:00"
+ },
{
"name": "league/commonmark",
"version": "0.18.5",
@@ -3629,6 +3735,88 @@
],
"time": "2019-12-02T02:32:27+00:00"
},
+ {
+ "name": "nesbot/carbon",
+ "version": "2.33.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/briannesbitt/Carbon.git",
+ "reference": "4d93cb95a80d9ffbff4018fe58ae3b7dd7f4b99b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4d93cb95a80d9ffbff4018fe58ae3b7dd7f4b99b",
+ "reference": "4d93cb95a80d9ffbff4018fe58ae3b7dd7f4b99b",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "php": "^7.1.8 || ^8.0",
+ "symfony/polyfill-mbstring": "^1.0",
+ "symfony/translation": "^3.4 || ^4.0 || ^5.0"
+ },
+ "require-dev": {
+ "doctrine/orm": "^2.7",
+ "friendsofphp/php-cs-fixer": "^2.14 || ^3.0",
+ "kylekatarnls/multi-tester": "^1.1",
+ "phpmd/phpmd": "^2.8",
+ "phpstan/phpstan": "^0.11",
+ "phpunit/phpunit": "^7.5 || ^8.0",
+ "squizlabs/php_codesniffer": "^3.4"
+ },
+ "bin": [
+ "bin/carbon"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.x-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Carbon\\Laravel\\ServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Carbon\\": "src/Carbon/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Brian Nesbitt",
+ "email": "brian@nesbot.com",
+ "homepage": "http://nesbot.com"
+ },
+ {
+ "name": "kylekatarnls",
+ "homepage": "http://github.com/kylekatarnls"
+ }
+ ],
+ "description": "An API extension for DateTime that supports 281 different languages.",
+ "homepage": "http://carbon.nesbot.com",
+ "keywords": [
+ "date",
+ "datetime",
+ "time"
+ ],
+ "funding": [
+ {
+ "url": "https://opencollective.com/Carbon",
+ "type": "open_collective"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-04-20T15:05:43+00:00"
+ },
{
"name": "nikic/php-parser",
"version": "v4.3.0",
@@ -4084,6 +4272,54 @@
],
"time": "2018-11-20T15:27:04+00:00"
},
+ {
+ "name": "psr/simple-cache",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/simple-cache.git",
+ "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
+ "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\SimpleCache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interfaces for simple caching",
+ "keywords": [
+ "cache",
+ "caching",
+ "psr",
+ "psr-16",
+ "simple-cache"
+ ],
+ "time": "2017-10-23T01:57:42+00:00"
+ },
{
"name": "psy/psysh",
"version": "v0.10.3",
@@ -6043,6 +6279,73 @@
],
"time": "2019-10-18T11:57:16+00:00"
},
+ {
+ "name": "voku/portable-ascii",
+ "version": "1.4.10",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/voku/portable-ascii.git",
+ "reference": "240e93829a5f985fab0984a6e55ae5e26b78a334"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/voku/portable-ascii/zipball/240e93829a5f985fab0984a6e55ae5e26b78a334",
+ "reference": "240e93829a5f985fab0984a6e55ae5e26b78a334",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.0.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~6.0 || ~7.0"
+ },
+ "suggest": {
+ "ext-intl": "Use Intl for transliterator_transliterate() support"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "voku\\": "src/voku/",
+ "voku\\tests\\": "tests/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Lars Moelleken",
+ "homepage": "http://www.moelleken.org/"
+ }
+ ],
+ "description": "Portable ASCII library - performance optimized (ascii) string functions for php.",
+ "homepage": "https://github.com/voku/portable-ascii",
+ "keywords": [
+ "ascii",
+ "clean",
+ "php"
+ ],
+ "funding": [
+ {
+ "url": "https://www.paypal.me/moelleken",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/voku",
+ "type": "github"
+ },
+ {
+ "url": "https://www.patreon.com/voku",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-03-13T01:23:26+00:00"
+ },
{
"name": "webflo/drupal-finder",
"version": "1.2.0",
diff --git a/web/modules/custom/custom/migrations/migrate_plus.migration.redirect.yml b/web/modules/custom/custom/migrations/migrate_plus.migration.redirect.yml
new file mode 100644
index 0000000..a40ba4d
--- /dev/null
+++ b/web/modules/custom/custom/migrations/migrate_plus.migration.redirect.yml
@@ -0,0 +1,51 @@
+id: redirect
+
+source:
+ plugin: url
+ data_fetcher_plugin: http
+ data_parser_plugin: json
+
+ urls: https://deploy-preview-213--opdavies.netlify.app/redirects.json
+
+ ids:
+ id:
+ type: integer
+
+ item_selector: redirects/
+
+ fields:
+ - name: id
+ selector: id
+ label: Redirect ID
+
+ - name: from
+ selector: from
+ label: From
+
+ - name: to
+ selector: to
+ label: To
+
+process:
+ redirect_source/path: from
+ redirect_redirect/uri:
+ plugin: opd_redirect
+ source: to
+
+ language:
+ plugin: default_value
+ default_value: und
+
+ status_code:
+ plugin: default_value
+ default_value: 301
+
+ uid:
+ plugin: default_value
+ default_value: 1
+
+destination:
+ plugin: 'entity:redirect'
+
+migration_dependencies:
+ required: { }
diff --git a/web/modules/custom/custom/src/Plugin/migrate/process/OpdRedirect.php b/web/modules/custom/custom/src/Plugin/migrate/process/OpdRedirect.php
new file mode 100644
index 0000000..50064b9
--- /dev/null
+++ b/web/modules/custom/custom/src/Plugin/migrate/process/OpdRedirect.php
@@ -0,0 +1,27 @@
+