public function WorkflowCollector::__construct in Workbench Moderation to Content Moderation 8.2
WorkflowCollector constructor.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.
\Drupal\Core\StringTranslation\TranslationInterface $translation: (optional) The string translation service.
File
- src/
WorkflowCollector.php, line 44
Class
Namespace
Drupal\wbm2cmCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, TranslationInterface $translation = NULL) {
$this->entityTypeManager = $entity_type_manager;
$this->stateStorage = $entity_type_manager
->getStorage('moderation_state');
$this->transitionStorage = $entity_type_manager
->getStorage('moderation_state_transition');
if ($translation) {
$this
->setStringTranslation($translation);
}
}