Drupal is a registered trademark of Dries Buytaert
cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)!

bca

244 sites Security covered
View on drupal.org

Allows bundle classes to be configured using attributes. This removes the need to implement hook_entity_bundle_info_alter().

Bundle class attributes are now in core. Since 11.4.0 Entity bundle classes can be defined and discovered using the Drupal\Core\Entity\Attribute\Bundle attribute. Existing sites using this module will continue to work, new sites should use functionality from Drupal core. It should be possible to migrate to the core attribute simply by swapping the namespace in your use statements.

Example

<?php

namespace Drupal\my_module\Entity\Node;

use Drupal\bca\Attribute\Bundle;
use Drupal\Core\StringTranslation\TranslatableMarkup;

#[Bundle(
  entityType: 'node',
  bundle: 'article',
  label: new TranslatableMarkup('Article'),
)]
class Article extends Node { }

Annotations

Prior to BCA 1.1.0 and Drupal 10.2.0 it is necessary to use annotations instead of attributes. The 1.1.x branch of this module supports using either annotations or attributes, while the 2.x branch supports only attributes. See the 1.1.x README for more details and examples.

Activity

Total releases
1
First release
Jun 2026
Latest release
1 day ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
2.0.x-dev Dev Jun 12, 2026