You are here

public function DefaultEntityLocalTaskProvider::__construct in Entity API 8

Constructs a DefaultEntityLocalTaskProvider object.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation.

File

src/Menu/DefaultEntityLocalTaskProvider.php, line 26

Class

DefaultEntityLocalTaskProvider
Provides a set of tasks to view, edit and duplicate an entity.

Namespace

Drupal\entity\Menu

Code

public function __construct(EntityTypeInterface $entity_type, TranslationInterface $string_translation) {
  $this
    ->setStringTranslation($string_translation);
}