massive custom modules and themes D11 compatibility

This commit is contained in:
2026-09-23 14:16:41 +02:00
parent 21092ae992
commit c38d01ee2b
34 changed files with 132 additions and 34 deletions
@@ -1,6 +1,6 @@
name: Materio Home
type: module
description: Defines home contents for materiO.
core_version_requirement: ^8.8 || ^9.2 || ^10.2
core_version_requirement: ^8.8 || ^9.2 || ^10.2 || ^11
package: Materio
dependencies:
@@ -123,6 +123,7 @@ function materio_home_entity_bundle_field_info(EntityTypeInterface $entity_type,
return $fields;
}
return [];
}
/**
* Implement hook_entity_base_field_info_alter().
@@ -196,7 +197,7 @@ function materio_home_cron(){
->accessCheck(FALSE)
->condition('type', 'frontpage');
$nids = $query->execute();
$nodes = entity_load_multiple('node', $nids);
$nodes = \Drupal::entityTypeManager()->getStorage('node')->loadMultiple($nids);
foreach ($nodes as $nid => $node) {
$logger->notice('cron | regenerating computed fields for '.$nid);
$node->save();
@@ -11,7 +11,7 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Drupal\Core\Cache\CacheableJsonResponse;
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Url;
use Drupal\core\render\RenderContext;
use Drupal\Core\Render\RenderContext;
/**
* Class AjaxHomeController.
@@ -8,7 +8,6 @@ use Drupal\Core\Field\FieldItemList;
use Drupal\Core\TypedData\TypedDataInterface;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\TypedData\ComputedItemListTrait;
use Drupal\workflow\Entity\WorkflowManager;
// https://www.drupal.org/node/2112677
@@ -49,7 +48,7 @@ class ComputedShowroomsReferences extends EntityReferenceFieldItemList
$i=0;
foreach ($tids as $tid) {
$term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($tid);
$sid = WorkflowManager::getCurrentStateId($term, 'field_workflow');
$sid = workflow_node_current_state($term, 'field_workflow');
if($sid != 'workflow_visible') continue;
$this->list[$i] = $this->createItem($i, $tid);
$i++;