Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti, bucefal91:...
Merge request reports
Activity
- added 1 commit 
- added 1 commit 
- added 4 commits - 2f638ca3 - Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti, bucefal91:...
- e028ecf5 - Revert "Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti,...
- 9d892967 - Revert "Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti,...
- 617bb194 - Revert "Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti,...
 Toggle commit list
- added 3597 commits - 
617bb194...98ed7a64 - 3588 commits from branch project:11.x
- dc70dd7e - Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti, bucefal91:...
- 36d3e72a - Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti, bucefal91:...
- 2f267f23 - Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti, bucefal91:...
- ea81224f - Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti, bucefal91:...
- 9643dc05 - Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti, bucefal91:...
- 30bc5ceb - Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti, bucefal91:...
- 9c975911 - Revert "Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti,...
- 10541820 - Revert "Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti,...
- 4e440670 - Revert "Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti,...
 Toggle commit list
- 
617bb194...98ed7a64 - 3588 commits from branch 
- added 1 commit - de6ddc7d - Use checkboxes and allow to select multiple allowed themes
 
- 78 - 78 - * {@inheritdoc} - 79 - 79 - */ - 80 - 80 - public function buildConfigurationForm(array $form, FormStateInterface $form_state) { - 81 - $form['theme'] = [ - 82 - '#type' => 'select', - 83 - '#title' => $this->t('Theme'), - 84 - '#default_value' => $this->configuration['theme'], - 85 - '#options' => array_map(function ($theme_info) { - 86 - return $theme_info->info['name']; - 87 - }, $this->themeHandler->listInfo()), - 81 - $form['themes'] = [ - 82 - '#type' => 'checkboxes', - 83 - '#title' => $this->t('Themes'), - 84 - '#default_value' => $this->configuration['themes'], - 85 - '#options' => $this->getAllAvailableThemeOptions(), - 86 - '#description' => $this->t('Select the themes this condition should evaluate TRUE on. If nothing is checked "Negate the condition" will be ignored and this condition always evaluates to TRUE.'), - changed this line in version 14 of the diff 
 
- added 43 commits - 
f484f964...ca7d5c90 - 25 commits from branch project:11.x
- ca7d5c90...badab730 - 8 earlier commits
- 4c407c5f - Revert "Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti,...
- 4e75b1e6 - Use checkboxes and allow to select multiple allowed themes
- 5cabe038 - Revert unrelated BlockForm change
- 81e079d1 - Adjust tests
- ed5e61c1 - Add empty update hook
- 79ef7fe3 - phpcs fix
- a47370ed - Further adjustments
- 34e61361 - Fix mapping test
- f8bdb967 - Further test adjustments
- 99f42ba6 - Adjust test schema
 Toggle commit list
- 
f484f964...ca7d5c90 - 25 commits from branch 
- 509 - 509 - condition.plugin.current_theme: - 510 - 510 - type: condition.plugin - 511 - 511 - mapping: - 512 - theme: - 513 - type: string - 514 - label: Theme - Comment on lines -512 to -514I think this schema entry might need to be deprecated instead of just removed. Not completely sure about this, since the example in How to deprecate is for a config schema definition, not a property. Either way, I think themeshould stay around for a while to be deprecated, and themes should derive its value fromthemefor BC until it's removed later.
- Agreed, the other option would be to deprecate the plugin itself but it's probably easier to deprecate the config key. Config schema supports a - deprecatedflag. The tricky bit is the upgrade path. There's discussion in https://www.drupal.org/project/drupal/issues/3521221 about block plugins but applies here as well.- We should be able to allow BC for the - themekey in the plugin itself and throw a deprecation if it's set, and automatically translate it to- themesat runtime? Then when the plugin is saved clear out the- themekey?
- changed this line in version 17 of the diff 
 
- 76 - 76 - 77 - 77 - /** - 78 - 78 - * {@inheritdoc} - 79 - 79 - */ - 80 - 80 - public function buildConfigurationForm(array $form, FormStateInterface $form_state) { - 81 - $form['theme'] = [ - 82 - '#type' => 'select', - 83 - '#title' => $this->t('Theme'), - 84 - '#default_value' => $this->configuration['theme'], - 85 - '#options' => array_map(function ($theme_info) { - 86 - return $theme_info->info['name']; - 87 - }, $this->themeHandler->listInfo()), - 81 - $form['themes'] = [ - 82 - '#type' => 'checkboxes', - 83 - '#title' => $this->t('Themes'), - 84 - '#default_value' => $this->configuration['themes'], - changed this line in version 17 of the diff 
 
- 93 - 92 - * {@inheritdoc} - 94 - 93 - */ - 95 - 94 - public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { - 96 - $this->configuration['theme'] = $form_state->getValue('theme'); - 95 - $this->configuration['themes'] = $form_state->getValue('themes'); - changed this line in version 27 of the diff 
 


 
 