t('Are you sure you want to delete all items from the feed %feed?', ['%feed' => $this->entity->label()]); } /** * {@inheritdoc} */ public function getCancelUrl() { return new Url('aggregator.admin_overview'); } /** * {@inheritdoc} */ public function getConfirmText() { return $this->t('Delete items'); } /** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { $this->entity->deleteItems(); $form_state->setRedirectUrl($this->getCancelUrl()); } }