Commit 753134ff authored by Antoine Forgue's avatar Antoine Forgue Committed by Maxime Rojat-Pahud
Browse files

Issue #3268566: Compatibility with DCG v2

parent 84fab277
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -35,16 +35,16 @@ it inherits from the main entity.

### EntityHtmlRouteProvider

TBD.
Provides routes for Sub entities (add-form, settings).

### ReferencedEntityForm

TBD.
Form controller for referenced entity edit forms.

### EntitySettingsForm

TBD.
Common class for entity settings form.

### ReferencedEntityListBuilder

TBD.
Provides a controller to build a listing of Sub entities.
+2 −2
Original line number Diff line number Diff line
@@ -5,9 +5,9 @@
    "license": "GPL-2.0+",
    "homepage": "https://drupal.org/project/subentity",
    "require": {
        "drupal/core": "^8.9 || ^9"
        "drupal/core": "^9 || ^10"
    },
    "conflict": {
        "drush/drush": ">=11"
        "drush/drush": "<11"
    }
}
+2 −2
Original line number Diff line number Diff line
services:
  subentity.generator:
    class: Drupal\subentity\Generators\SubEntityGenerator
    class: \Drupal\subentity\Generators\Entity\SubEntityGenerator
    tags:
       - { name: drush.generator }
      - { name: drush.generator.v2 }
+4 −4
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ use Drupal\Core\Entity\Exception\UndefinedLinkTemplateException;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * Provides a list controller for custom entity.
 * Provides a controller to build a listing of Sub entities.
 */
class ReferencedEntityListBuilder extends EntityListBuilder {

@@ -23,7 +23,7 @@ class ReferencedEntityListBuilder extends EntityListBuilder {
  protected $entityTypeManager;

  /**
   * Constructs a new EntityListBuilder object.
   * Constructs a new ReferencedEntityListBuilder object.
   *
   * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
   *   The entity type definition.
@@ -90,8 +90,8 @@ class ReferencedEntityListBuilder extends EntityListBuilder {

        /** @var \Drupal\Core\Entity\ContentEntityInterface $entity_parent */
        foreach ($entities as $entity_parent) {
          // @FIXME Tester la méthode $entity_parent->hasLinkTemplate($rel) pour éviter le try/catch.
          // Certaines entités (Paragraph) n'ont pas de link template canonical.
          // @FIXME Try method $entity_parent->hasLinkTemplate($rel) to avoid try/catch.
          // Some entities (Paragraph) do not have a canonical template link.
          try {
            $row['parent'] = $entity_parent->toLink('[' . $entity_parent->id() . '-' . $entity_parent->bundle() . '] ' . $entity_parent->label());
          }
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ use Drupal\Core\Entity\Routing\AdminHtmlRouteProvider;
use Symfony\Component\Routing\Route;

/**
 * Provides routes for Entity entities.
 * Provides routes for Sub entities.
 *
 * @see Drupal\Core\Entity\Routing\AdminHtmlRouteProvider
 * @see Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider
Loading