'#default_value' => $comment_type->getTargetEntityTypeId(),
'#title' => t('Target entity type'),
'#options' => $options,
- '#description' => t('The target entity type can not be changed after the comment type has been created.')
+ '#description' => t('The target entity type can not be changed after the comment type has been created.'),
];
}
else {
$edit_link = $this->entity->link($this->t('Edit'));
if ($status == SAVED_UPDATED) {
- drupal_set_message(t('Comment type %label has been updated.', ['%label' => $comment_type->label()]));
+ $this->messenger()->addStatus(t('Comment type %label has been updated.', ['%label' => $comment_type->label()]));
$this->logger->notice('Comment type %label has been updated.', ['%label' => $comment_type->label(), 'link' => $edit_link]);
}
else {
$this->commentManager->addBodyField($comment_type->id());
- drupal_set_message(t('Comment type %label has been added.', ['%label' => $comment_type->label()]));
+ $this->messenger()->addStatus(t('Comment type %label has been added.', ['%label' => $comment_type->label()]));
$this->logger->notice('Comment type %label has been added.', ['%label' => $comment_type->label(), 'link' => $edit_link]);
}