public function EntityDecorator::decorate in Commerce AutoSKU 8.2
Automatic entity label entity decorator.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity:
Return value
\Drupal\commerce_autosku\CommerceAutoSkuManager|\Drupal\Core\Entity\ContentEntityInterface
Overrides EntityDecoratorInterface::decorate
File
- src/
EntityDecorator.php, line 55 - Contains \Drupal\commerce_autosku\EntityDecorator.
Class
- EntityDecorator
- Provides an content entity decorator for automatic label generation.
Namespace
Drupal\commerce_autoskuCode
public function decorate(ContentEntityInterface $entity) {
$this->entity = new CommerceAutoSkuManager($entity, $this->entityTypeManager, $this->generatorManager);
return $this->entity;
}