diff --git a/config/default/core.extension.yml b/config/default/core.extension.yml index 281bc3f38..c9d0c66ef 100644 --- a/config/default/core.extension.yml +++ b/config/default/core.extension.yml @@ -11,7 +11,6 @@ module: config_split: 0 contextual: 0 ctools: 0 - custom: 0 datetime: 0 dblog: 0 discoverable_entity_bundle_classes: 0 @@ -40,7 +39,8 @@ module: migrate_plus: 0 migrate_tools: 0 node: 0 - opd_talks: 0 + opdavies_blog: 0 + opdavies_talks: 0 options: 0 page_cache: 0 path: 0 diff --git a/config/default/views.view.talks.yml b/config/default/views.view.talks.yml index 4bd658674..c41eaea8d 100644 --- a/config/default/views.view.talks.yml +++ b/config/default/views.view.talks.yml @@ -8,7 +8,7 @@ dependencies: - system.menu.main module: - node - - opd_talks + - opdavies_talks - user id: talks label: Talks diff --git a/web/modules/custom/custom/custom.services.yml b/web/modules/custom/custom/custom.services.yml deleted file mode 100644 index 21c4bb30a..000000000 --- a/web/modules/custom/custom/custom.services.yml +++ /dev/null @@ -1,14 +0,0 @@ -services: - Drupal\custom\EventSubscriber\UpdateTalkNodeBeforeSave: - tags: - - { name: event_subscriber } - - Drupal\custom\EventSubscriber\PushBlogPostToSocialMedia: - tags: - - { name: event_subscriber } - - Drupal\custom\Repository\PostRepository: - autowire: true - - Drupal\custom\Service\TalkCounter: - autowire: true diff --git a/web/modules/custom/opd_talks/opd_talks.module b/web/modules/custom/opd_talks/opd_talks.module deleted file mode 100644 index a10b3afb7..000000000 --- a/web/modules/custom/opd_talks/opd_talks.module +++ /dev/null @@ -1,33 +0,0 @@ -__invoke(); -} - -/** - * Implements hook_views_data_alter(). - */ -function opd_talks_views_data_alter(array &$data): void { - $data['node__field_event_date']['event_sort'] = [ - 'title' => t('Custom event sort'), - 'group' => t('Content'), - 'help' => t('Sort events by past/future, then distance from now.'), - 'sort' => [ - 'field' => 'field_event_date_value', - 'id' => 'event_sort', - ] - ]; -} diff --git a/web/modules/custom/opd_talks/opd_talks.services.yml b/web/modules/custom/opd_talks/opd_talks.services.yml deleted file mode 100644 index 3b6a5cff6..000000000 --- a/web/modules/custom/opd_talks/opd_talks.services.yml +++ /dev/null @@ -1,6 +0,0 @@ -services: - Drupal\opd_talks\Repository\TalkRepository: - autowire: true - - Drupal\opd_talks\Service\TalkDateUpdater: - autowire: true diff --git a/web/modules/custom/custom/config/schema/custom.schema.yml b/web/modules/custom/opdavies_blog/config/schema/opdavies_blog.schema.yml similarity index 100% rename from web/modules/custom/custom/config/schema/custom.schema.yml rename to web/modules/custom/opdavies_blog/config/schema/opdavies_blog.schema.yml diff --git a/web/modules/custom/custom/drush.services.yml b/web/modules/custom/opdavies_blog/drush.services.yml similarity index 56% rename from web/modules/custom/custom/drush.services.yml rename to web/modules/custom/opdavies_blog/drush.services.yml index 94ced4293..8563617af 100644 --- a/web/modules/custom/custom/drush.services.yml +++ b/web/modules/custom/opdavies_blog/drush.services.yml @@ -1,11 +1,11 @@ services: - Drupal\custom\Command\ExportBodyValuesForThemePurgingCommand: + Drupal\opdavies_blog\Command\ExportBodyValuesForThemePurgingCommand: arguments: ['@database'] autowire: true tags: - { name: drush.command } - Drupal\custom\Command\FormatTagNamesCommand: + Drupal\opdavies_blog\Command\FormatTagNamesCommand: autowire: true tags: - { name: drush.command } diff --git a/web/modules/custom/custom/hooks/entity_type/build.inc b/web/modules/custom/opdavies_blog/hooks/entity_type/build.inc similarity index 84% rename from web/modules/custom/custom/hooks/entity_type/build.inc rename to web/modules/custom/opdavies_blog/hooks/entity_type/build.inc index 2a74b8015..4978ce1e1 100644 --- a/web/modules/custom/custom/hooks/entity_type/build.inc +++ b/web/modules/custom/opdavies_blog/hooks/entity_type/build.inc @@ -12,7 +12,7 @@ use Drupal\discoverable_entity_bundle_classes\Storage\Node\NodeStorage; /** * Implements hook_entity_type_build(). */ -function custom_entity_type_build(array &$entityTypes): void { +function opdavies_blog_entity_type_build(array &$entityTypes): void { /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entityTypes */ if (isset($entityTypes['node'])) { $entityTypes['node']->setStorageClass(NodeStorage::class); diff --git a/web/modules/custom/custom/hooks/node_links/alter.inc b/web/modules/custom/opdavies_blog/hooks/node_links/alter.inc similarity index 88% rename from web/modules/custom/custom/hooks/node_links/alter.inc rename to web/modules/custom/opdavies_blog/hooks/node_links/alter.inc index e49cfa909..bc94afcf7 100644 --- a/web/modules/custom/custom/hooks/node_links/alter.inc +++ b/web/modules/custom/opdavies_blog/hooks/node_links/alter.inc @@ -13,7 +13,7 @@ use Drupal\node\NodeInterface; /** * Implements hook_node_links_alter(). */ -function custom_node_links_alter(array &$links, NodeInterface $node): void { +function opdavies_blog_node_links_alter(array &$links, NodeInterface $node): void { if (!method_exists($node, 'getExternalLink')) { return; } diff --git a/web/modules/custom/custom/hooks/preprocess/block.inc b/web/modules/custom/opdavies_blog/hooks/preprocess/block.inc similarity index 82% rename from web/modules/custom/custom/hooks/preprocess/block.inc rename to web/modules/custom/opdavies_blog/hooks/preprocess/block.inc index e4afdb0fd..f9032b3e0 100644 --- a/web/modules/custom/custom/hooks/preprocess/block.inc +++ b/web/modules/custom/opdavies_blog/hooks/preprocess/block.inc @@ -10,7 +10,7 @@ declare(strict_types=1); /** * Implements hook_preprocess_HOOK(). */ -function custom_preprocess_block(array &$variables): void { +function opdavies_blog_preprocess_block(array &$variables): void { // Add the 'markup' class to blocks. if (in_array($variables['plugin_id'], ['views_block:featured_blog_posts-block_1'])) { $variables['attributes']['class'][] = 'markup'; diff --git a/web/modules/custom/custom/hooks/preprocess/node.inc b/web/modules/custom/opdavies_blog/hooks/preprocess/node.inc similarity index 82% rename from web/modules/custom/custom/hooks/preprocess/node.inc rename to web/modules/custom/opdavies_blog/hooks/preprocess/node.inc index aabde2b58..525215849 100644 --- a/web/modules/custom/custom/hooks/preprocess/node.inc +++ b/web/modules/custom/opdavies_blog/hooks/preprocess/node.inc @@ -10,7 +10,7 @@ declare(strict_types=1); /** * Implements hook_preprocess_HOOK(). */ -function custom_preprocess_node(array &$variables): void { +function opdavies_blog_preprocess_node(array &$variables): void { if (!method_exists($variables['node'], 'getExternalLink')) { return; } diff --git a/web/modules/custom/custom/custom.info.yml b/web/modules/custom/opdavies_blog/opdavies_blog.info.yml similarity index 62% rename from web/modules/custom/custom/custom.info.yml rename to web/modules/custom/opdavies_blog/opdavies_blog.info.yml index 99f52cc20..2469aa48f 100644 --- a/web/modules/custom/custom/custom.info.yml +++ b/web/modules/custom/opdavies_blog/opdavies_blog.info.yml @@ -1,9 +1,9 @@ -name: Oliver Davies custom module +name: Oliver Davies blog type: module core_version_requirement: ^8 || ^9 package: Custom dependencies: - drupal:node + - discoverable_entity_bundle_classes:discoverable_entity_bundle_classes - hook_event_dispatcher:hook_event_dispatcher - paragraphs:paragraphs -package: Custom diff --git a/web/modules/custom/custom/custom.install b/web/modules/custom/opdavies_blog/opdavies_blog.install similarity index 73% rename from web/modules/custom/custom/custom.install rename to web/modules/custom/opdavies_blog/opdavies_blog.install index 7965eb774..789d9c2fc 100644 --- a/web/modules/custom/custom/custom.install +++ b/web/modules/custom/opdavies_blog/opdavies_blog.install @@ -2,12 +2,12 @@ declare(strict_types=1); -use Drupal\custom\Repository\PostRepository; +use Drupal\opdavies_blog\Repository\PostRepository; /** * Mark existing blog posts as sent to social media. */ -function custom_update_8001(): void { +function opdavies_blog_update_8001(): void { $posts = \Drupal::service(PostRepository::class)->getAll(); foreach ($posts as $post) { diff --git a/web/modules/custom/custom/custom.module b/web/modules/custom/opdavies_blog/opdavies_blog.module similarity index 100% rename from web/modules/custom/custom/custom.module rename to web/modules/custom/opdavies_blog/opdavies_blog.module diff --git a/web/modules/custom/opdavies_blog/opdavies_blog.services.yml b/web/modules/custom/opdavies_blog/opdavies_blog.services.yml new file mode 100644 index 000000000..2f627f8fc --- /dev/null +++ b/web/modules/custom/opdavies_blog/opdavies_blog.services.yml @@ -0,0 +1,7 @@ +services: + Drupal\opdavies_blog\EventSubscriber\PushBlogPostToSocialMedia: + tags: + - { name: event_subscriber } + + Drupal\opdavies_blog\Repository\PostRepository: + autowire: true diff --git a/web/modules/custom/custom/src/Command/ExportBodyValuesForThemePurgingCommand.php b/web/modules/custom/opdavies_blog/src/Command/ExportBodyValuesForThemePurgingCommand.php similarity index 96% rename from web/modules/custom/custom/src/Command/ExportBodyValuesForThemePurgingCommand.php rename to web/modules/custom/opdavies_blog/src/Command/ExportBodyValuesForThemePurgingCommand.php index e33447b9b..24da58470 100644 --- a/web/modules/custom/custom/src/Command/ExportBodyValuesForThemePurgingCommand.php +++ b/web/modules/custom/opdavies_blog/src/Command/ExportBodyValuesForThemePurgingCommand.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Drupal\custom\Command; +namespace Drupal\opdavies_blog\Command; use Drupal\Core\Database\Connection; use Illuminate\Support\Collection; diff --git a/web/modules/custom/custom/src/Command/FormatTagNamesCommand.php b/web/modules/custom/opdavies_blog/src/Command/FormatTagNamesCommand.php similarity index 98% rename from web/modules/custom/custom/src/Command/FormatTagNamesCommand.php rename to web/modules/custom/opdavies_blog/src/Command/FormatTagNamesCommand.php index 7d83e9282..29fe9e901 100644 --- a/web/modules/custom/custom/src/Command/FormatTagNamesCommand.php +++ b/web/modules/custom/opdavies_blog/src/Command/FormatTagNamesCommand.php @@ -2,20 +2,13 @@ declare(strict_types=1); -namespace Drupal\custom\Command; +namespace Drupal\opdavies_blog\Command; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drush\Commands\DrushCommands; final class FormatTagNamesCommand extends DrushCommands { - /** - * The taxonomy term storage. - * - * @var \Drupal\Core\Entity\EntityStorageInterface - */ - private $termStorage; - /** * A lookup table for new name overrides. * @@ -90,6 +83,13 @@ final class FormatTagNamesCommand extends DrushCommands { 'virtualhostx' => 'VirtualHostX', ]; + /** + * The taxonomy term storage. + * + * @var \Drupal\Core\Entity\EntityStorageInterface + */ + private $termStorage; + public function __construct(EntityTypeManagerInterface $entityTypeManager) { parent::__construct(); diff --git a/web/modules/custom/custom/src/Entity/Node/Post.php b/web/modules/custom/opdavies_blog/src/Entity/Node/Post.php similarity index 95% rename from web/modules/custom/custom/src/Entity/Node/Post.php rename to web/modules/custom/opdavies_blog/src/Entity/Node/Post.php index b119c3c89..7744d179b 100644 --- a/web/modules/custom/custom/src/Entity/Node/Post.php +++ b/web/modules/custom/opdavies_blog/src/Entity/Node/Post.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Drupal\custom\Entity\Node; +namespace Drupal\opdavies_blog\Entity\Node; use Drupal\discoverable_entity_bundle_classes\ContentEntityBundleInterface; use Drupal\node\Entity\Node; diff --git a/web/modules/custom/custom/src/EventSubscriber/PushBlogPostToSocialMedia.php b/web/modules/custom/opdavies_blog/src/EventSubscriber/PushBlogPostToSocialMedia.php similarity index 93% rename from web/modules/custom/custom/src/EventSubscriber/PushBlogPostToSocialMedia.php rename to web/modules/custom/opdavies_blog/src/EventSubscriber/PushBlogPostToSocialMedia.php index fd6581c1b..70a4097f0 100644 --- a/web/modules/custom/custom/src/EventSubscriber/PushBlogPostToSocialMedia.php +++ b/web/modules/custom/opdavies_blog/src/EventSubscriber/PushBlogPostToSocialMedia.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace Drupal\custom\EventSubscriber; +namespace Drupal\opdavies_blog\EventSubscriber; -use Drupal\custom\Entity\Node\Post; use Drupal\hook_event_dispatcher\Event\Entity\BaseEntityEvent; use Drupal\hook_event_dispatcher\HookEventDispatcherInterface; +use Drupal\opdavies_blog\Entity\Node\Post; use Symfony\Component\EventDispatcher\EventSubscriberInterface; final class PushBlogPostToSocialMedia implements EventSubscriberInterface { diff --git a/web/modules/custom/custom/src/Repository/PostRepository.php b/web/modules/custom/opdavies_blog/src/Repository/PostRepository.php similarity index 92% rename from web/modules/custom/custom/src/Repository/PostRepository.php rename to web/modules/custom/opdavies_blog/src/Repository/PostRepository.php index 809c9ae92..a76f480af 100644 --- a/web/modules/custom/custom/src/Repository/PostRepository.php +++ b/web/modules/custom/opdavies_blog/src/Repository/PostRepository.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Drupal\custom\Repository; +namespace Drupal\opdavies_blog\Repository; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; diff --git a/web/modules/custom/custom/tests/modules/opdavies_posts_test/config/install/field.field.node.post.field_has_tweet.yml b/web/modules/custom/opdavies_blog/tests/modules/opdavies_blog_test/config/install/field.field.node.post.field_has_tweet.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/opdavies_posts_test/config/install/field.field.node.post.field_has_tweet.yml rename to web/modules/custom/opdavies_blog/tests/modules/opdavies_blog_test/config/install/field.field.node.post.field_has_tweet.yml diff --git a/web/modules/custom/custom/tests/modules/opdavies_posts_test/config/install/field.storage.node.field_has_tweet.yml b/web/modules/custom/opdavies_blog/tests/modules/opdavies_blog_test/config/install/field.storage.node.field_has_tweet.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/opdavies_posts_test/config/install/field.storage.node.field_has_tweet.yml rename to web/modules/custom/opdavies_blog/tests/modules/opdavies_blog_test/config/install/field.storage.node.field_has_tweet.yml diff --git a/web/modules/custom/custom/tests/modules/opdavies_posts_test/config/install/node.type.post.yml b/web/modules/custom/opdavies_blog/tests/modules/opdavies_blog_test/config/install/node.type.post.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/opdavies_posts_test/config/install/node.type.post.yml rename to web/modules/custom/opdavies_blog/tests/modules/opdavies_blog_test/config/install/node.type.post.yml diff --git a/web/modules/custom/custom/tests/modules/opdavies_posts_test/opdavies_posts_test.info.yml b/web/modules/custom/opdavies_blog/tests/modules/opdavies_blog_test/opdavies_blog_test.info.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/opdavies_posts_test/opdavies_posts_test.info.yml rename to web/modules/custom/opdavies_blog/tests/modules/opdavies_blog_test/opdavies_blog_test.info.yml diff --git a/web/modules/custom/custom/tests/src/Kernel/Entity/Node/PostTest.php b/web/modules/custom/opdavies_blog/tests/src/Kernel/Entity/Node/PostTest.php similarity index 84% rename from web/modules/custom/custom/tests/src/Kernel/Entity/Node/PostTest.php rename to web/modules/custom/opdavies_blog/tests/src/Kernel/Entity/Node/PostTest.php index 665587ba7..9c3332bca 100644 --- a/web/modules/custom/custom/tests/src/Kernel/Entity/Node/PostTest.php +++ b/web/modules/custom/opdavies_blog/tests/src/Kernel/Entity/Node/PostTest.php @@ -4,9 +4,9 @@ declare(strict_types=1); namespace Drupal\Tests\custom\Kernel\Entity\Node; -use Drupal\custom\Entity\Node\Post; use Drupal\KernelTests\Core\Entity\EntityKernelTestBase; use Drupal\node\Entity\Node; +use Drupal\opdavies_blog\Entity\Node\Post; final class PostTest extends EntityKernelTestBase { @@ -18,8 +18,8 @@ final class PostTest extends EntityKernelTestBase { 'discoverable_entity_bundle_classes', // Custom. - 'custom', - 'opdavies_posts_test', + 'opdavies_blog', + 'opdavies_blog_test', ]; /** @test */ @@ -39,7 +39,7 @@ final class PostTest extends EntityKernelTestBase { protected function setUp() { parent::setUp(); - $this->installConfig(['opdavies_posts_test']); + $this->installConfig(['opdavies_blog_test']); } } diff --git a/web/modules/custom/opd_talks/opd_talks.info.yml b/web/modules/custom/opdavies_talks/opdavies_talks.info.yml similarity index 60% rename from web/modules/custom/opd_talks/opd_talks.info.yml rename to web/modules/custom/opdavies_talks/opdavies_talks.info.yml index a1b07e3c9..de2957f69 100644 --- a/web/modules/custom/opd_talks/opd_talks.info.yml +++ b/web/modules/custom/opdavies_talks/opdavies_talks.info.yml @@ -3,3 +3,5 @@ description: Custom code for talks pages. type: module core_version_requirement: ^8 || ^9 package: Custom +dependencies: + - discoverable_entity_bundle_classes:discoverable_entity_bundle_classes diff --git a/web/modules/custom/opd_talks/opd_talks.install b/web/modules/custom/opdavies_talks/opdavies_talks.install similarity index 72% rename from web/modules/custom/opd_talks/opd_talks.install rename to web/modules/custom/opdavies_talks/opdavies_talks.install index 2db8d5ad8..9086955f9 100644 --- a/web/modules/custom/opd_talks/opd_talks.install +++ b/web/modules/custom/opdavies_talks/opdavies_talks.install @@ -2,12 +2,12 @@ declare(strict_types=1); -use Drupal\opd_talks\Repository\TalkRepository; +use Drupal\opdavies_talks\Repository\TalkRepository; /** * Set talk type for all existing talks. */ -function opd_talks_update_8001(): void { +function opdavies_talks_update_8001(): void { $talkRepository = \Drupal::service(TalkRepository::class); foreach ($talkRepository->getAll() as $talk) { diff --git a/web/modules/custom/opdavies_talks/opdavies_talks.module b/web/modules/custom/opdavies_talks/opdavies_talks.module new file mode 100644 index 000000000..4bd265c7e --- /dev/null +++ b/web/modules/custom/opdavies_talks/opdavies_talks.module @@ -0,0 +1,45 @@ +__invoke(); +} + +/** + * Implements hook_views_data_alter(). + */ +function opdavies_talks_views_data_alter(array &$data): void { + $data['node__field_event_date']['event_sort'] = [ + 'title' => t('Custom event sort'), + 'group' => t('Content'), + 'help' => t('Sort events by past/future, then distance from now.'), + 'sort' => [ + 'field' => 'field_event_date_value', + 'id' => 'event_sort', + ], + ]; +} + +/** + * Implements hook_entity_type_build(). + */ +function opdavies_talks_entity_type_build(array &$entityTypes): void { + /** @var EntityTypeInterface[] $entityTypes */ + if (isset($entityTypes['node'])) { + $entityTypes['node']->setStorageClass(NodeStorage::class); + } +} diff --git a/web/modules/custom/opdavies_talks/opdavies_talks.services.yml b/web/modules/custom/opdavies_talks/opdavies_talks.services.yml new file mode 100644 index 000000000..8533d2e7d --- /dev/null +++ b/web/modules/custom/opdavies_talks/opdavies_talks.services.yml @@ -0,0 +1,13 @@ +services: + Drupal\opdavies_talks\EventSubscriber\UpdateTalkNodeBeforeSave: + tags: + - { name: event_subscriber } + + Drupal\opdavies_talks\Repository\TalkRepository: + autowire: true + + Drupal\opdavies_talks\Service\TalkCounter: + autowire: true + + Drupal\opdavies_talks\Service\TalkDateUpdater: + autowire: true diff --git a/web/modules/custom/custom/src/Entity/Node/Talk.php b/web/modules/custom/opdavies_talks/src/Entity/Node/Talk.php similarity index 96% rename from web/modules/custom/custom/src/Entity/Node/Talk.php rename to web/modules/custom/opdavies_talks/src/Entity/Node/Talk.php index 1eed5e1ee..7d3ec7aad 100644 --- a/web/modules/custom/custom/src/Entity/Node/Talk.php +++ b/web/modules/custom/opdavies_talks/src/Entity/Node/Talk.php @@ -1,6 +1,6 @@ getEntity(); $this->reorderEvents($talk); $this->updateCreatedDate($talk); diff --git a/web/modules/custom/opd_talks/src/Plugin/views/sort/Event.php b/web/modules/custom/opdavies_talks/src/Plugin/views/sort/Event.php similarity index 96% rename from web/modules/custom/opd_talks/src/Plugin/views/sort/Event.php rename to web/modules/custom/opdavies_talks/src/Plugin/views/sort/Event.php index 48ad8b545..68bdc16b9 100644 --- a/web/modules/custom/opd_talks/src/Plugin/views/sort/Event.php +++ b/web/modules/custom/opdavies_talks/src/Plugin/views/sort/Event.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Drupal\opd_talks\Plugin\views\sort; +namespace Drupal\opdavies_talks\Plugin\views\sort; use Carbon\Carbon; use Drupal\Component\Datetime\TimeInterface; diff --git a/web/modules/custom/opd_talks/src/Repository/TalkRepository.php b/web/modules/custom/opdavies_talks/src/Repository/TalkRepository.php similarity index 89% rename from web/modules/custom/opd_talks/src/Repository/TalkRepository.php rename to web/modules/custom/opdavies_talks/src/Repository/TalkRepository.php index 9977e27b1..2fe40e599 100644 --- a/web/modules/custom/opd_talks/src/Repository/TalkRepository.php +++ b/web/modules/custom/opdavies_talks/src/Repository/TalkRepository.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace Drupal\opd_talks\Repository; +namespace Drupal\opdavies_talks\Repository; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\custom\Entity\Node\Talk; +use Drupal\opdavies_blog\Entity\Node\Talk; use Illuminate\Support\Collection; final class TalkRepository { diff --git a/web/modules/custom/custom/src/Service/TalkCounter.php b/web/modules/custom/opdavies_talks/src/Service/TalkCounter.php similarity index 93% rename from web/modules/custom/custom/src/Service/TalkCounter.php rename to web/modules/custom/opdavies_talks/src/Service/TalkCounter.php index 933ab00fa..de522c810 100644 --- a/web/modules/custom/custom/src/Service/TalkCounter.php +++ b/web/modules/custom/opdavies_talks/src/Service/TalkCounter.php @@ -2,12 +2,11 @@ declare(strict_types=1); -namespace Drupal\custom\Service; +namespace Drupal\opdavies_talks\Service; use Carbon\Carbon; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\custom\Entity\Node\Talk; use Drupal\node\NodeInterface; use Drupal\paragraphs\ParagraphInterface; use Illuminate\Support\Collection; diff --git a/web/modules/custom/opd_talks/src/Service/TalkDateUpdater.php b/web/modules/custom/opdavies_talks/src/Service/TalkDateUpdater.php similarity index 92% rename from web/modules/custom/opd_talks/src/Service/TalkDateUpdater.php rename to web/modules/custom/opdavies_talks/src/Service/TalkDateUpdater.php index afddb448a..7af638abe 100644 --- a/web/modules/custom/opd_talks/src/Service/TalkDateUpdater.php +++ b/web/modules/custom/opdavies_talks/src/Service/TalkDateUpdater.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Drupal\opd_talks\Service; +namespace Drupal\opdavies_talks\Service; use Carbon\Carbon; use Drupal\Component\Datetime\TimeInterface; -use Drupal\custom\Entity\Node\Talk; use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface; -use Drupal\opd_talks\Repository\TalkRepository; +use Drupal\opdavies_talks\Entity\Node\Talk; +use Drupal\opdavies_talks\Repository\TalkRepository; use Drupal\paragraphs\ParagraphInterface; final class TalkDateUpdater { diff --git a/web/modules/custom/custom/tests/modules/custom_test/config/install/field.field.node.talk.field_event_date.yml b/web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.field.node.talk.field_event_date.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/custom_test/config/install/field.field.node.talk.field_event_date.yml rename to web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.field.node.talk.field_event_date.yml diff --git a/web/modules/custom/custom/tests/modules/custom_test/config/install/field.field.node.talk.field_events.yml b/web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.field.node.talk.field_events.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/custom_test/config/install/field.field.node.talk.field_events.yml rename to web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.field.node.talk.field_events.yml diff --git a/web/modules/custom/custom/tests/modules/custom_test/config/install/field.field.paragraph.event.field_date.yml b/web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.field.paragraph.event.field_date.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/custom_test/config/install/field.field.paragraph.event.field_date.yml rename to web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.field.paragraph.event.field_date.yml diff --git a/web/modules/custom/custom/tests/modules/custom_test/config/install/field.field.paragraph.event.field_name.yml b/web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.field.paragraph.event.field_name.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/custom_test/config/install/field.field.paragraph.event.field_name.yml rename to web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.field.paragraph.event.field_name.yml diff --git a/web/modules/custom/custom/tests/modules/custom_test/config/install/field.storage.node.field_event_date.yml b/web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.storage.node.field_event_date.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/custom_test/config/install/field.storage.node.field_event_date.yml rename to web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.storage.node.field_event_date.yml diff --git a/web/modules/custom/custom/tests/modules/custom_test/config/install/field.storage.node.field_events.yml b/web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.storage.node.field_events.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/custom_test/config/install/field.storage.node.field_events.yml rename to web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.storage.node.field_events.yml diff --git a/web/modules/custom/custom/tests/modules/custom_test/config/install/field.storage.paragraph.field_date.yml b/web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.storage.paragraph.field_date.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/custom_test/config/install/field.storage.paragraph.field_date.yml rename to web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.storage.paragraph.field_date.yml diff --git a/web/modules/custom/custom/tests/modules/custom_test/config/install/field.storage.paragraph.field_name.yml b/web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.storage.paragraph.field_name.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/custom_test/config/install/field.storage.paragraph.field_name.yml rename to web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/field.storage.paragraph.field_name.yml diff --git a/web/modules/custom/custom/tests/modules/custom_test/config/install/node.type.talk.yml b/web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/node.type.talk.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/custom_test/config/install/node.type.talk.yml rename to web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/node.type.talk.yml diff --git a/web/modules/custom/custom/tests/modules/custom_test/config/install/paragraphs.paragraphs_type.event.yml b/web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/paragraphs.paragraphs_type.event.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/custom_test/config/install/paragraphs.paragraphs_type.event.yml rename to web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/paragraphs.paragraphs_type.event.yml diff --git a/web/modules/custom/custom/tests/modules/custom_test/config/install/views.view.talks.yml b/web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/views.view.talks.yml similarity index 99% rename from web/modules/custom/custom/tests/modules/custom_test/config/install/views.view.talks.yml rename to web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/views.view.talks.yml index b7fb867ad..8c564a309 100644 --- a/web/modules/custom/custom/tests/modules/custom_test/config/install/views.view.talks.yml +++ b/web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/config/install/views.view.talks.yml @@ -7,7 +7,7 @@ dependencies: - system.menu.main module: - node - - opd_talks + - opdavies_talks - user id: talks label: Talks diff --git a/web/modules/custom/custom/tests/modules/custom_test/custom_test.info.yml b/web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/opdavies_talks_test.info.yml similarity index 100% rename from web/modules/custom/custom/tests/modules/custom_test/custom_test.info.yml rename to web/modules/custom/opdavies_talks/tests/modules/opdavies_talks_test/opdavies_talks_test.info.yml diff --git a/web/modules/custom/custom/tests/src/Kernel/CountPreviousTalksTest.php b/web/modules/custom/opdavies_talks/tests/src/Kernel/CountPreviousTalksTest.php similarity index 93% rename from web/modules/custom/custom/tests/src/Kernel/CountPreviousTalksTest.php rename to web/modules/custom/opdavies_talks/tests/src/Kernel/CountPreviousTalksTest.php index 861f5fa4f..ea70f9dea 100644 --- a/web/modules/custom/custom/tests/src/Kernel/CountPreviousTalksTest.php +++ b/web/modules/custom/opdavies_talks/tests/src/Kernel/CountPreviousTalksTest.php @@ -2,11 +2,11 @@ declare(strict_types = 1); -namespace Drupal\Tests\custom\Kernel; +namespace Drupal\Tests\opdavies_talks\Kernel; use Carbon\Carbon; -use Drupal\custom\Service\TalkCounter; use Drupal\node\NodeInterface; +use Drupal\opdavies_talks\Service\TalkCounter; use PHPUnit\Framework\Assert; class CountPreviousTalksTest extends TalksTestBase { diff --git a/web/modules/custom/custom/tests/src/Kernel/EventsAreReorderedByDateTest.php b/web/modules/custom/opdavies_talks/tests/src/Kernel/EventsAreReorderedByDateTest.php similarity index 98% rename from web/modules/custom/custom/tests/src/Kernel/EventsAreReorderedByDateTest.php rename to web/modules/custom/opdavies_talks/tests/src/Kernel/EventsAreReorderedByDateTest.php index 67ba828a1..7ba60c8b5 100644 --- a/web/modules/custom/custom/tests/src/Kernel/EventsAreReorderedByDateTest.php +++ b/web/modules/custom/opdavies_talks/tests/src/Kernel/EventsAreReorderedByDateTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Drupal\Tests\custom\Kernel; +namespace Drupal\Tests\opdavies_talks\Kernel; use Carbon\Carbon; use Drupal\paragraphs\ParagraphInterface; diff --git a/web/modules/custom/opd_talks/tests/src/Kernel/TalkEventDateTest.php b/web/modules/custom/opdavies_talks/tests/src/Kernel/TalkEventDateTest.php similarity index 94% rename from web/modules/custom/opd_talks/tests/src/Kernel/TalkEventDateTest.php rename to web/modules/custom/opdavies_talks/tests/src/Kernel/TalkEventDateTest.php index 4fe674d52..f1a714c4d 100644 --- a/web/modules/custom/opd_talks/tests/src/Kernel/TalkEventDateTest.php +++ b/web/modules/custom/opdavies_talks/tests/src/Kernel/TalkEventDateTest.php @@ -1,13 +1,12 @@ installEntitySchema('paragraph'); $this->installSchema('node', ['node_access']); - $this->installConfig(['custom_test']); + $this->installConfig(['opdavies_talks_test']); } } diff --git a/web/modules/custom/custom/tests/src/Kernel/UpdatesTalkCreatedDateTest.php b/web/modules/custom/opdavies_talks/tests/src/Kernel/UpdatesTalkCreatedDateTest.php similarity index 96% rename from web/modules/custom/custom/tests/src/Kernel/UpdatesTalkCreatedDateTest.php rename to web/modules/custom/opdavies_talks/tests/src/Kernel/UpdatesTalkCreatedDateTest.php index 3aaecdea7..74fe12cf1 100644 --- a/web/modules/custom/custom/tests/src/Kernel/UpdatesTalkCreatedDateTest.php +++ b/web/modules/custom/opdavies_talks/tests/src/Kernel/UpdatesTalkCreatedDateTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Drupal\Tests\custom\Kernel; +namespace Drupal\Tests\opdavies_talks\Kernel; use Carbon\Carbon; use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface;