Loading README.md +2 −1 Changes for README.md: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -37,11 +37,12 @@ Modules that implement the API: Install Prepopulate module to pass data to the node form via inline actions: - post url to link fields https://drupal.org/project/prepopulate https://www.drupal.org/project/prepopulate ## Images Install the Magnific popup module so that images are shown in a gallery. https://www.drupal.org/project/magnific_popup ## Node forms Loading config/install/reader.settings.yml +1 −0 Changes for config/install/reader.settings.yml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -6,3 +6,4 @@ read_more: true read_more_height: 350 use_prepopulate: false use_infinite_scroll: false use_magnific_popup: false config/schema/reader.schema.yml +3 −0 Changes for config/schema/reader.schema.yml: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -38,3 +38,6 @@ reader.settings: use_infinite_scroll: type: boolean label: 'Infinite Scroll' use_magnific_popup: type: boolean label: 'Magnific popup' src/Controller/ReaderController.php +1 −1 Changes for src/Controller/ReaderController.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -364,7 +364,7 @@ class ReaderController extends ControllerBase { } // Magnific popup. if ($this->moduleHandler()->moduleExists('magnific_popup')) { if ($this->config('reader.settings')->get('use_magnific_popup')) { $build['#attached']['library'][] = 'magnific_popup/magnific_popup'; } Loading src/Form/ReaderSettingsForm.php +9 −0 Changes for src/Form/ReaderSettingsForm.php: 9 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -126,6 +126,14 @@ class ReaderSettingsForm extends ConfigFormBase { '#disabled' => !$this->moduleHandler->moduleExists('prepopulate'), ]; $form['article']['use_magnific_popup'] = [ '#type' => 'checkbox', '#title' => $this->t('Use Magnific Popup'), '#default_value' => $config->get('use_magnific_popup'), '#description' => $this->t('Shows images in a popup using the Magnific Popup module.'), '#disabled' => !$this->moduleHandler->moduleExists('magnific_popup'), ]; $form['article']['use_infinite_scroll'] = [ '#type' => 'checkbox', '#title' => $this->t('Use infinite scroll'), Loading Loading @@ -200,6 +208,7 @@ class ReaderSettingsForm extends ConfigFormBase { ->set('filter_format', $form_state->getValue('filter_format')) ->set('node_hide', array_filter($form_state->getValue('node_hide'))) ->set('use_prepopulate', $form_state->getValue('use_prepopulate')) ->set('use_magnific_popup', $form_state->getValue('use_magnific_popup')) ->set('use_infinite_scroll', $form_state->getValue('use_infinite_scroll')) ->set('alter_node_form', $form_state->getValue('alter_node_form')) ->save(); Loading Loading
README.md +2 −1 Changes for README.md: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -37,11 +37,12 @@ Modules that implement the API: Install Prepopulate module to pass data to the node form via inline actions: - post url to link fields https://drupal.org/project/prepopulate https://www.drupal.org/project/prepopulate ## Images Install the Magnific popup module so that images are shown in a gallery. https://www.drupal.org/project/magnific_popup ## Node forms Loading
config/install/reader.settings.yml +1 −0 Changes for config/install/reader.settings.yml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -6,3 +6,4 @@ read_more: true read_more_height: 350 use_prepopulate: false use_infinite_scroll: false use_magnific_popup: false
config/schema/reader.schema.yml +3 −0 Changes for config/schema/reader.schema.yml: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -38,3 +38,6 @@ reader.settings: use_infinite_scroll: type: boolean label: 'Infinite Scroll' use_magnific_popup: type: boolean label: 'Magnific popup'
src/Controller/ReaderController.php +1 −1 Changes for src/Controller/ReaderController.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -364,7 +364,7 @@ class ReaderController extends ControllerBase { } // Magnific popup. if ($this->moduleHandler()->moduleExists('magnific_popup')) { if ($this->config('reader.settings')->get('use_magnific_popup')) { $build['#attached']['library'][] = 'magnific_popup/magnific_popup'; } Loading
src/Form/ReaderSettingsForm.php +9 −0 Changes for src/Form/ReaderSettingsForm.php: 9 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -126,6 +126,14 @@ class ReaderSettingsForm extends ConfigFormBase { '#disabled' => !$this->moduleHandler->moduleExists('prepopulate'), ]; $form['article']['use_magnific_popup'] = [ '#type' => 'checkbox', '#title' => $this->t('Use Magnific Popup'), '#default_value' => $config->get('use_magnific_popup'), '#description' => $this->t('Shows images in a popup using the Magnific Popup module.'), '#disabled' => !$this->moduleHandler->moduleExists('magnific_popup'), ]; $form['article']['use_infinite_scroll'] = [ '#type' => 'checkbox', '#title' => $this->t('Use infinite scroll'), Loading Loading @@ -200,6 +208,7 @@ class ReaderSettingsForm extends ConfigFormBase { ->set('filter_format', $form_state->getValue('filter_format')) ->set('node_hide', array_filter($form_state->getValue('node_hide'))) ->set('use_prepopulate', $form_state->getValue('use_prepopulate')) ->set('use_magnific_popup', $form_state->getValue('use_magnific_popup')) ->set('use_infinite_scroll', $form_state->getValue('use_infinite_scroll')) ->set('alter_node_form', $form_state->getValue('alter_node_form')) ->save(); Loading