Loading src/Form/DefaultForm.php +34 −1 Changes for src/Form/DefaultForm.php: 34 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -2,7 +2,10 @@ namespace Drupal\notify\Form; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Messenger\MessengerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; use Drupal\Core\Form\FormStateInterface; Loading @@ -11,6 +14,36 @@ use Drupal\Core\Form\FormStateInterface; */ class DefaultForm extends ConfigFormBase { /** * Drupal\Core\Messenger\MessengerInterface definition. * * @var \Drupal\Core\Messenger\MessengerInterface */ protected $messenger; /** * Class constructor. * * @param ConfigFactoryInterface $config_factory * The config factory. * @param MessengerInterface $messenger * The core messenger service. */ public function __construct(ConfigFactoryInterface $config_factory, MessengerInterface $messenger) { parent::__construct($config_factory); $this->messenger = $messenger; } /** * {@inheritdoc} */ public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), $container->get('messenger') ); } /** * {@inheritdoc} */ Loading Loading @@ -123,7 +156,7 @@ class DefaultForm extends ConfigFormBase { ->set('notify_def_teasers', $values['teasers']) ->set('notify_nodetypes', $values['notify_nodetypes']) ->save(); drupal_set_message(t('Notify default settings saved.')); $this->messenger->addMessage(t('Notify default settings saved.')); } } src/Form/QueueForm.php +1 Changes for src/Form/QueueForm.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ use Drupal\Core\Form\FormStateInterface; * Defines a form that configures forms module settings. */ class QueueForm extends ConfigFormBase { /** * Drupal\Core\Messenger\MessengerInterface definition. * Loading Loading
src/Form/DefaultForm.php +34 −1 Changes for src/Form/DefaultForm.php: 34 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -2,7 +2,10 @@ namespace Drupal\notify\Form; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Messenger\MessengerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; use Drupal\Core\Form\FormStateInterface; Loading @@ -11,6 +14,36 @@ use Drupal\Core\Form\FormStateInterface; */ class DefaultForm extends ConfigFormBase { /** * Drupal\Core\Messenger\MessengerInterface definition. * * @var \Drupal\Core\Messenger\MessengerInterface */ protected $messenger; /** * Class constructor. * * @param ConfigFactoryInterface $config_factory * The config factory. * @param MessengerInterface $messenger * The core messenger service. */ public function __construct(ConfigFactoryInterface $config_factory, MessengerInterface $messenger) { parent::__construct($config_factory); $this->messenger = $messenger; } /** * {@inheritdoc} */ public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), $container->get('messenger') ); } /** * {@inheritdoc} */ Loading Loading @@ -123,7 +156,7 @@ class DefaultForm extends ConfigFormBase { ->set('notify_def_teasers', $values['teasers']) ->set('notify_nodetypes', $values['notify_nodetypes']) ->save(); drupal_set_message(t('Notify default settings saved.')); $this->messenger->addMessage(t('Notify default settings saved.')); } }
src/Form/QueueForm.php +1 Changes for src/Form/QueueForm.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ use Drupal\Core\Form\FormStateInterface; * Defines a form that configures forms module settings. */ class QueueForm extends ConfigFormBase { /** * Drupal\Core\Messenger\MessengerInterface definition. * Loading