RssFeedsForm.php

Same filename in other branches
  1. 9 core/modules/system/src/Form/RssFeedsForm.php
  2. 8.9.x core/modules/system/src/Form/RssFeedsForm.php
  3. 11.x core/modules/system/src/Form/RssFeedsForm.php

Namespace

Drupal\system\Form

File

core/modules/system/src/Form/RssFeedsForm.php

View source
<?php

namespace Drupal\system\Form;

use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;

/**
 * Configure RSS settings for this site.
 *
 * @internal
 */
class RssFeedsForm extends ConfigFormBase {
    
    /**
     * {@inheritdoc}
     */
    public function getFormId() {
        return 'system_rss_feeds_settings';
    }
    
    /**
     * {@inheritdoc}
     */
    protected function getEditableConfigNames() {
        return [
            'system.rss',
        ];
    }
    
    /**
     * {@inheritdoc}
     */
    public function buildForm(array $form, FormStateInterface $form_state) {
        $form['feed_view_mode'] = [
            '#type' => 'select',
            '#title' => $this->t('Feed content'),
            '#config_target' => 'system.rss:items.view_mode',
            '#options' => [
                'title' => $this->t('Titles only'),
                'teaser' => $this->t('Titles plus teaser'),
                'fulltext' => $this->t('Full text'),
            ],
            '#description' => $this->t('Global setting for the default display of content items in each feed.'),
        ];
        return parent::buildForm($form, $form_state);
    }

}

Classes

Title Deprecated Summary
RssFeedsForm Configure RSS settings for this site.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.