Skip to content
Snippets Groups Projects

Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti, bucefal91:...

Issue #2783897 by albeorte, andregp, Chi, Eduardo Morales Alberti, bucefal91: Drupal Current theme condition plugin should provide an option to select all themes

Closes #2783897

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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.'),
  • Joshua Sedler added 1 commit

    added 1 commit

    Compare with previous version

  • Joshua Sedler added 1 commit

    added 1 commit

    Compare with previous version

  • Joshua Sedler added 1 commit

    added 1 commit

    Compare with previous version

  • Joshua Sedler added 43 commits

    added 43 commits

    Compare with previous version

  • 509 509 condition.plugin.current_theme:
    510 510 type: condition.plugin
    511 511 mapping:
    512 theme:
    513 type: string
    514 label: Theme
  • 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'],
  • 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');
  • Joshua Sedler added 1 commit

    added 1 commit

    • a3f8b01f - Bring back "theme" and deprecate it

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading