Closed
Description
For now, entity bundle classes generated by DCG 2 are placed in the namespace Drupal\mymodule\Entity\Bundle:
<?php
namespace Drupal\mymodule\Entity\Bundle;
use Drupal\node\Entity\Node;
/**
* A bundle class for node entities.
*/
class ArticleBundle extends Node {
...
}
However, most documentation and blog posts I've seen for now favor putting them directly in the 'Entity' namespace. Here's an excellent example: https://www.hashbangcode.com/article/drupal-9-entity-bundle-classes.
This is highly opinionated, but IMHO DCG should follow established best practices, so I'd suggest changing the namespace.
Metadata
Metadata
Assignees
Labels
No labels