closedquestion-8.x-3.x-dev/src/Form/ClosedQuestionAnswerDeleteForm.php

src/Form/ClosedQuestionAnswerDeleteForm.php
<?php

namespace Drupal\closedquestion\Form;

use Drupal\Core\Entity\ContentEntityDeleteForm;

/**
 * Provides a form for deleting an entity.
 *
 * @internal
 */
class ClosedQuestionAnswerDeleteForm extends ContentEntityDeleteForm {

  /**
   * {@inheritdoc}
   */
  protected function getDeletionMessage() {
    return $this->t('The answer %title has been deleted.', [
      '%title' => $this->getEntity()->label(),
    ]);
  }

  /**
   * {@inheritdoc}
   */
  protected function logDeletionMessage() {
    /** @var \Drupal\closedquestion\Entity\ClosedQuestionAnswerInterface $entity */
    $entity = $this->getEntity();
    $this->logger('closedquestion')->notice('The answer %title has been deleted.', ['%title' => $entity->label()]);
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc