replaced deprecated functions
This commit is contained in:
@ -107,7 +107,7 @@ class OCCaseRevisionDeleteForm extends ConfirmFormBase {
|
||||
$this->OCCaseStorage->deleteRevision($this->revision->getRevisionId());
|
||||
|
||||
$this->logger('content')->notice('Case: deleted %title revision %revision.', ['%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()]);
|
||||
drupal_set_message(t('Revision from %revision-date of Case %title has been deleted.', ['%revision-date' => format_date($this->revision->getRevisionCreationTime()), '%title' => $this->revision->label()]));
|
||||
\Drupal::messenger()->addMessage(t('Revision from %revision-date of Case %title has been deleted.', ['%revision-date' => format_date($this->revision->getRevisionCreationTime()), '%title' => $this->revision->label()]));
|
||||
$form_state->setRedirect(
|
||||
'entity.oc_case.canonical',
|
||||
['oc_case' => $this->revision->id()]
|
||||
|
@ -120,7 +120,7 @@ class OCCaseRevisionRevertForm extends ConfirmFormBase {
|
||||
$this->revision->save();
|
||||
|
||||
$this->logger('content')->notice('Case: reverted %title revision %revision.', ['%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()]);
|
||||
drupal_set_message(t('Case %title has been reverted to the revision from %revision-date.', ['%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
|
||||
\Drupal::messenger()->addMessage(t('Case %title has been reverted to the revision from %revision-date.', ['%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
|
||||
$form_state->setRedirect(
|
||||
'entity.oc_case.version_history',
|
||||
['oc_case' => $this->revision->id()]
|
||||
|
@ -38,7 +38,7 @@ class OCCaseTypeDeleteForm extends EntityConfirmFormBase {
|
||||
public function submitForm(array &$form, FormStateInterface $form_state) {
|
||||
$this->entity->delete();
|
||||
|
||||
drupal_set_message(
|
||||
\Drupal::messenger()->addMessage(
|
||||
$this->t('content @type: deleted @label.',
|
||||
[
|
||||
'@type' => $this->entity->bundle(),
|
||||
|
@ -49,13 +49,13 @@ class OCCaseTypeForm extends EntityForm {
|
||||
|
||||
switch ($status) {
|
||||
case SAVED_NEW:
|
||||
drupal_set_message($this->t('Created the %label Case type.', [
|
||||
\Drupal::messenger()->addMessage($this->t('Created the %label Case type.', [
|
||||
'%label' => $oc_case_type->label(),
|
||||
]));
|
||||
break;
|
||||
|
||||
default:
|
||||
drupal_set_message($this->t('Saved the %label Case type.', [
|
||||
\Drupal::messenger()->addMessage($this->t('Saved the %label Case type.', [
|
||||
'%label' => $oc_case_type->label(),
|
||||
]));
|
||||
}
|
||||
|
Reference in New Issue
Block a user