Loading CHANGELOG.md +4 −4 Original line number Diff line number Diff line Loading @@ -30,10 +30,10 @@ Improve usability: https://www.drupal.org/project/campaignmonitor/issues/2941242 ## 8.x-1.0-beta2 * Fix twig template: https://www.drupal.org/node/2888014 * Fix composer.json error: https://www.drupal.org/node/2887580 * Remove references to mailchimp in campaign submodule: https://www.drupal.org/node/2884660 * Remove undefined function in campaignmonitor_campaign: https://www.drupal.org/node/2883787 * [Fix twig template](https://www.drupal.org/node/2888014) * [Fix composer.json error](https://www.drupal.org/node/2887580) * [Remove refs to mailchimp in campaign submodule](https://www.drupal.org/node/2884660) * [Remove undefined func in campaignmonitor_campaign](https://www.drupal.org/node/2883787) ## 8.x-2.0-alpha1 Loading campaignmonitor.module +7 −6 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ /** * @file * Module that plugs in Campaign Monitor functionality to your Drupal web site. * * For Campaign Monitor information see: http://www.campaignmonitor.com/. */ Loading @@ -16,18 +17,20 @@ function campaignmonitor_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { // Main module help for the facets module. case 'campaignmonitor.admin': return '<p>' . t('Use your API key and other keys to have users register for a mailing list setup through $output = '<p>' . t('Use your API key and other keys to have users register for a mailing list setup through Campaign Monitor.') . '</p>'; break; case 'help.page.campaignmonitor': $output = '<p>' . t('In order for a newsletter list to be available for selection on the site it needs to be enabled from <a href="@admin">Lists</a>', ['@admin' => '/admin/config/services/campaignmonitor/lists'] ) . '</p>'; return $output; break; } return $output; } /** Loading @@ -42,9 +45,7 @@ function campaignmonitor_theme($existing, $type, $theme, $path) { } /** * Implements hook_ENTITY_TYPE_delete. * * @param \Drupal\Core\Entity\EntityInterface $entity * Implements hook_ENTITY_TYPE_delete(). */ function campaignmonitor_user_delete(EntityInterface $entity) { // Unsubscribe users when deleted. Loading campaignmonitor.services.yml +1 −1 Original line number Diff line number Diff line Loading @@ -4,4 +4,4 @@ services: arguments: ['@config.factory', '@logger.factory', '@cache.data', '@language_manager', '@module_handler'] campaignmonitor.subscription_manager: class: Drupal\campaignmonitor\CampaignMonitorSubscriptionManager arguments: ['@campaignmonitor.manager', '@config.factory', '@logger.factory', '@cache.data', '@language_manager', '@module_handler', '@current_user', '@entity_type.manager', '@messenger'] arguments: ['@campaignmonitor.manager', '@config.factory', '@logger.factory', '@cache.data', '@language_manager', '@module_handler', '@current_user', '@entity_type.manager', '@messenger', '@token'] modules/campaignmonitor_registration/campaignmonitor_registration.module +8 −13 Original line number Diff line number Diff line Loading @@ -2,8 +2,7 @@ /** * @file * Enable users to select which newsletter lists they want to subscribe on the * registration page. * Select newsletter lists users want to subscribe on the registration page. */ use Drupal\Core\Form\FormStateInterface; Loading Loading @@ -124,7 +123,7 @@ function campaignmonitor_registration_form_user_register_form_alter(&$form, Form /** * After build callback to apply descriptions to checkbox items. * * @param $element * @param Drupal\Core\Render\Element $element * The elements. * @param Drupal\Core\Form\FormStateInterface $form_state * The current s state of the form. Loading @@ -132,7 +131,7 @@ function campaignmonitor_registration_form_user_register_form_alter(&$form, Form * @return mixed * The element with description. */ function _campaignmonitor_registration_option_descriptions($element, &$form_state) { function _campaignmonitor_registration_option_descriptions(Element $element, FormStateInterface &$form_state) { foreach (Element::children($element) as $key) { $element[$key]['#description'] = t('@description', [ '@description' => $element['#option_descriptions'][$key], Loading @@ -142,8 +141,9 @@ function _campaignmonitor_registration_option_descriptions($element, &$form_stat } /** * Submission form handler. Information about the selected list will be: * Submitted to Campaign Monitor. * Submission form handler. * * Information about the selected list will be: submitted to Campaign Monitor. */ function campaignmonitor_registration_form_user_register_submit(&$form, FormStateInterface &$form_state) { $values = $form_state->getValues(); Loading @@ -166,11 +166,6 @@ function campaignmonitor_registration_form_user_register_submit(&$form, FormStat /** * Implements hook_form_BASE_FORM_ID_alter(). * * @param $form * The form. * @param \Drupal\Core\Form\FormStateInterface $form_state * The current form state. */ function campaignmonitor_registration_form_campaignmonitor_list_settings_form_alter(&$form, FormStateInterface &$form_state) { // Find form key to index the form array and load defaults. Loading Loading @@ -200,10 +195,10 @@ function campaignmonitor_registration_form_campaignmonitor_list_settings_form_al * * @param array $form * The form. * @param FormStateInterface $form_state * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. */ function campaignmonitor_registration_form_campaignmonitor_list_settings_submit(&$form, FormStateInterface &$form_state) { function campaignmonitor_registration_form_campaignmonitor_list_settings_submit(array &$form, FormStateInterface &$form_state) { $list_id = $form['listId']['#value']; $values = $form_state->getValues(); $values = $values['campaignmonitor_list_' . $list_id]; Loading modules/campaignmonitor_registration/src/Form/CampaignMonitorRegistrationAdminForm.php +0 −8 Original line number Diff line number Diff line Loading @@ -73,14 +73,6 @@ class CampaignMonitorRegistrationAdminForm extends ConfigFormBase { return parent::buildForm($form, $form_state); } /** * {@inheritdoc} */ public function validateForm(array &$form, FormStateInterface $form_state) { parent::validateForm($form, $form_state); } /** * {@inheritdoc} */ Loading Loading
CHANGELOG.md +4 −4 Original line number Diff line number Diff line Loading @@ -30,10 +30,10 @@ Improve usability: https://www.drupal.org/project/campaignmonitor/issues/2941242 ## 8.x-1.0-beta2 * Fix twig template: https://www.drupal.org/node/2888014 * Fix composer.json error: https://www.drupal.org/node/2887580 * Remove references to mailchimp in campaign submodule: https://www.drupal.org/node/2884660 * Remove undefined function in campaignmonitor_campaign: https://www.drupal.org/node/2883787 * [Fix twig template](https://www.drupal.org/node/2888014) * [Fix composer.json error](https://www.drupal.org/node/2887580) * [Remove refs to mailchimp in campaign submodule](https://www.drupal.org/node/2884660) * [Remove undefined func in campaignmonitor_campaign](https://www.drupal.org/node/2883787) ## 8.x-2.0-alpha1 Loading
campaignmonitor.module +7 −6 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ /** * @file * Module that plugs in Campaign Monitor functionality to your Drupal web site. * * For Campaign Monitor information see: http://www.campaignmonitor.com/. */ Loading @@ -16,18 +17,20 @@ function campaignmonitor_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { // Main module help for the facets module. case 'campaignmonitor.admin': return '<p>' . t('Use your API key and other keys to have users register for a mailing list setup through $output = '<p>' . t('Use your API key and other keys to have users register for a mailing list setup through Campaign Monitor.') . '</p>'; break; case 'help.page.campaignmonitor': $output = '<p>' . t('In order for a newsletter list to be available for selection on the site it needs to be enabled from <a href="@admin">Lists</a>', ['@admin' => '/admin/config/services/campaignmonitor/lists'] ) . '</p>'; return $output; break; } return $output; } /** Loading @@ -42,9 +45,7 @@ function campaignmonitor_theme($existing, $type, $theme, $path) { } /** * Implements hook_ENTITY_TYPE_delete. * * @param \Drupal\Core\Entity\EntityInterface $entity * Implements hook_ENTITY_TYPE_delete(). */ function campaignmonitor_user_delete(EntityInterface $entity) { // Unsubscribe users when deleted. Loading
campaignmonitor.services.yml +1 −1 Original line number Diff line number Diff line Loading @@ -4,4 +4,4 @@ services: arguments: ['@config.factory', '@logger.factory', '@cache.data', '@language_manager', '@module_handler'] campaignmonitor.subscription_manager: class: Drupal\campaignmonitor\CampaignMonitorSubscriptionManager arguments: ['@campaignmonitor.manager', '@config.factory', '@logger.factory', '@cache.data', '@language_manager', '@module_handler', '@current_user', '@entity_type.manager', '@messenger'] arguments: ['@campaignmonitor.manager', '@config.factory', '@logger.factory', '@cache.data', '@language_manager', '@module_handler', '@current_user', '@entity_type.manager', '@messenger', '@token']
modules/campaignmonitor_registration/campaignmonitor_registration.module +8 −13 Original line number Diff line number Diff line Loading @@ -2,8 +2,7 @@ /** * @file * Enable users to select which newsletter lists they want to subscribe on the * registration page. * Select newsletter lists users want to subscribe on the registration page. */ use Drupal\Core\Form\FormStateInterface; Loading Loading @@ -124,7 +123,7 @@ function campaignmonitor_registration_form_user_register_form_alter(&$form, Form /** * After build callback to apply descriptions to checkbox items. * * @param $element * @param Drupal\Core\Render\Element $element * The elements. * @param Drupal\Core\Form\FormStateInterface $form_state * The current s state of the form. Loading @@ -132,7 +131,7 @@ function campaignmonitor_registration_form_user_register_form_alter(&$form, Form * @return mixed * The element with description. */ function _campaignmonitor_registration_option_descriptions($element, &$form_state) { function _campaignmonitor_registration_option_descriptions(Element $element, FormStateInterface &$form_state) { foreach (Element::children($element) as $key) { $element[$key]['#description'] = t('@description', [ '@description' => $element['#option_descriptions'][$key], Loading @@ -142,8 +141,9 @@ function _campaignmonitor_registration_option_descriptions($element, &$form_stat } /** * Submission form handler. Information about the selected list will be: * Submitted to Campaign Monitor. * Submission form handler. * * Information about the selected list will be: submitted to Campaign Monitor. */ function campaignmonitor_registration_form_user_register_submit(&$form, FormStateInterface &$form_state) { $values = $form_state->getValues(); Loading @@ -166,11 +166,6 @@ function campaignmonitor_registration_form_user_register_submit(&$form, FormStat /** * Implements hook_form_BASE_FORM_ID_alter(). * * @param $form * The form. * @param \Drupal\Core\Form\FormStateInterface $form_state * The current form state. */ function campaignmonitor_registration_form_campaignmonitor_list_settings_form_alter(&$form, FormStateInterface &$form_state) { // Find form key to index the form array and load defaults. Loading Loading @@ -200,10 +195,10 @@ function campaignmonitor_registration_form_campaignmonitor_list_settings_form_al * * @param array $form * The form. * @param FormStateInterface $form_state * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. */ function campaignmonitor_registration_form_campaignmonitor_list_settings_submit(&$form, FormStateInterface &$form_state) { function campaignmonitor_registration_form_campaignmonitor_list_settings_submit(array &$form, FormStateInterface &$form_state) { $list_id = $form['listId']['#value']; $values = $form_state->getValues(); $values = $values['campaignmonitor_list_' . $list_id]; Loading
modules/campaignmonitor_registration/src/Form/CampaignMonitorRegistrationAdminForm.php +0 −8 Original line number Diff line number Diff line Loading @@ -73,14 +73,6 @@ class CampaignMonitorRegistrationAdminForm extends ConfigFormBase { return parent::buildForm($form, $form_state); } /** * {@inheritdoc} */ public function validateForm(array &$form, FormStateInterface $form_state) { parent::validateForm($form, $form_state); } /** * {@inheritdoc} */ Loading