Rename module site_structure → structural_pages and vocabulary site_section → site_sections

Renames the module from site_structure to structural_pages and pluralizes
the taxonomy vocabulary machine name from site_section to site_sections,
updating all config, PHP, translations, and documentation references
while preserving field_site_section, clears_site_section, and $site_section_id.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-05 08:10:32 -03:00
parent 7c898ad339
commit 88b9605408
37 changed files with 545 additions and 281 deletions

View File

@@ -2,13 +2,13 @@
declare(strict_types=1);
namespace Drupal\site_structure\Plugin\ParentEntityHandler;
namespace Drupal\structural_pages\Plugin\ParentEntityHandler;
use Drupal\Core\Breadcrumb\Breadcrumb;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\site_structure\Attribute\ParentEntityHandler;
use Drupal\site_structure\ParentEntityHandler\ParentEntityHandlerBase;
use Drupal\structural_pages\Attribute\ParentEntityHandler;
use Drupal\structural_pages\ParentEntityHandler\ParentEntityHandlerBase;
use Drupal\taxonomy\TermInterface;
/**
@@ -20,7 +20,7 @@ use Drupal\taxonomy\TermInterface;
entity_type_id: 'taxonomy_term',
clears_site_section: FALSE,
sort_field: 'name',
bundle_restrictions: ['site_section'],
bundle_restrictions: ['site_sections'],
weight: 0,
)]
class TaxonomyTermHandler extends ParentEntityHandlerBase {
@@ -69,8 +69,8 @@ class TaxonomyTermHandler extends ParentEntityHandlerBase {
return NULL;
}
// Only site_section terms can be site sections.
if ($entity->bundle() !== 'site_section') {
// Only site_sections terms can be site sections.
if ($entity->bundle() !== 'site_sections') {
return NULL;
}