You are here

public function EntityDecorator::decorate in Automatic Entity Label 8.3

Same name and namespace in other branches
  1. 8 src/EntityDecorator.php \Drupal\auto_entitylabel\EntityDecorator::decorate()
  2. 8.2 src/EntityDecorator.php \Drupal\auto_entitylabel\EntityDecorator::decorate()

Automatic entity label entity decorator.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: Entity.

Return value

\Drupal\auto_entitylabel\AutoEntityLabelManager|\Drupal\Core\Entity\ContentEntityInterface Return Content Entity Interface.

Overrides EntityDecoratorInterface::decorate

File

src/EntityDecorator.php, line 78

Class

EntityDecorator
Provides an content entity decorator for automatic label generation.

Namespace

Drupal\auto_entitylabel

Code

public function decorate(ContentEntityInterface $entity) {
  return new AutoEntityLabelManager($entity, $this->configFactory, $this->entityTypeManager, $this->token, $this->moduleHandler);
}