public function EntityTraitManagerInterface::installTrait in Commerce Core 8.2
Installs the given trait for the given entity type and bundle.
Installing a trait attaches any fields that the trait provides to the given bundle.
Parameters
\Drupal\commerce\Plugin\Commerce\EntityTrait\EntityTraitInterface $trait: The trait.
string $entity_type_id: The entity type id.
string $bundle: The bundle.
1 method overrides EntityTraitManagerInterface::installTrait()
- EntityTraitManager::installTrait in src/
EntityTraitManager.php - Installs the given trait for the given entity type and bundle.
File
- src/
EntityTraitManagerInterface.php, line 50
Class
- EntityTraitManagerInterface
- Defines the interface for commerce_entity_trait plugin managers.
Namespace
Drupal\commerceCode
public function installTrait(EntityTraitInterface $trait, $entity_type_id, $bundle);