Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
/**
* The entity types that can have this trait.
*
* When empty, defaults to all entity types.
*
* @var array
*/
public $entity_types;
This is a bit confusing when trying to understand how this system works, as the trait plugins get applied to, say, the product *type*, but have an effect on the products, and the value for this property in this example would be 'product'.
Maybe something like this:
The content entity types that can have this trait.
The bundle entities of the content entity type will reference the trait, and receive any fields it defines.
When empty, defaults to all content entity types.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2886730-3.commerce.clarify-description-of-CommerceEntityTraitentitytypes.patch | 674 bytes | joachim |
Comments
Comment #2
bojanz CreditAttribution: bojanz at Centarro commentedSounds good. Wanna create a patch so you can get commit credit?
Comment #3
joachim CreditAttribution: joachim at Torchbox commentedSure!
Comment #4
dhare23 CreditAttribution: dhare23 at Acro Commerce commentedThe patch didn't apply:
src/Annotation/p.patch.txt:10: trailing whitespace.
* The content entity types that can have this trait.
src/Annotation/p.patch.txt:13: trailing whitespace.
* The bundle entities of the content entity type will reference the trait,
src/Annotation/p.patch.txt:14: trailing whitespace.
* and receive any fields it defines.
src/Annotation/p.patch.txt:15: trailing whitespace.
*
src/Annotation/p.patch.txt:16: trailing whitespace.
* When empty, defaults to all content entity types.
error: corrupt patch at line 19
Comment #5
joachim CreditAttribution: joachim as a volunteer commentedI think there's something wrong with your setup. The patch just applied fine for me to the 8.x-2.x branch, and I don't see any trailing whitespace.
Comment #6
dhare23 CreditAttribution: dhare23 at Acro Commerce commentedIt was my setup before, it applied successfully.
Comment #8
bojanz CreditAttribution: bojanz at Centarro commentedCommitted, thanks!