Build the FieldList for the logout form

@return FieldList
189410
protected function getFormFields()
    {
        $fields = FieldList::create();

        $controller = $this->getController();
        $backURL = $controller->getBackURL()
            ?: $controller->getReturnReferer();

        // Protect against infinite redirection back to the logout URL after logging out
        if (!$backURL || Director::makeRelative($backURL) === $controller->getRequest()->getURL()) {
            $backURL = Director::baseURL();
        }

        $fields->push(HiddenField::create('BackURL', 'BackURL', $backURL));

        return $fields;
    }
650166
public function getCMSFields()
    {
        // Obtain Field Objects (from parent):
        
        $fields = parent::getCMSFields();
        
        // Define Placeholder:
        
        $placeholder = _t(__CLASS__ . '.DROPDOWNDEFAULT', '(default)');
        
        // Create Style Fields:
        
        $fields->addFieldsToTab(
            'Root.Style',
            [
                FieldSection::create(
                    'IconStyle',
                    $this->fieldLabel('IconStyle'),
                    [
                        DropdownField::create(
                            'IconSize',
                            $this->fieldLabel('IconSize'),
                            SharingIcon::singleton()->getIconSizeOptions()
                        ),
                        DropdownField::create(
                            'Placement',
                            $this->fieldLabel('Placement'),
                            SharingIcon::singleton()->getPlacementOptions()
                        )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder)
                    ]
                )
            ]
        );
        
        // Create Options Fields:
        
        $fields->addFieldsToTab(
            'Root.Options',
            [
                FieldSection::create(
                    'IconOptions',
                    $this->fieldLabel('IconOptions'),
                    [
                        CheckboxField::create(
                            'ShowTitles',
                            $this->fieldLabel('ShowTitles')
                        )
                    ]
                )
            ]
        );
        
        // Answer Field Objects:
        
        return $fields;
    }
450770
public function getCMSFields()
    {
        // Obtain Field Objects (from parent):
        
        $fields = parent::getCMSFields();
        
        // Create Main Fields:
        
        $fields->addFieldToTab(
            'Root.Main',
            HTMLEditorField::create(
                'Content',
                $this->fieldLabel('Content')
            ),
            'LinkTo'
        );
        
        // Create Options Fields:
        
        $fields->addFieldToTab(
            'Root.Options',
            FieldSection::create(
                'ContentOptions',
                $this->fieldLabel('ContentOptions'),
                [
                    DropdownField::create(
                        'LinkMode',
                        $this->fieldLabel('LinkMode'),
                        $this->getLinkModeOptions()
                    ),
                    TextField::create(
                        'ButtonLabel',
                        $this->fieldLabel('ButtonLabel')
                    )
                ]
            )
        );
        
        // Answer Field Objects:
        
        return $fields;
    }
1364007
public function VisibleFields()
    {
        $visibleFields = new FieldList();

        foreach ($this as $field) {
            if (!($field instanceof HiddenField)) {
                $visibleFields->push($field);
            }
        }

        return $visibleFields;
    }
440646
public function getCMSFields()
    {
        $this->beforeUpdateCMSFields(function (FieldList $fields) {
            /** @var TabSet $rootTabSet */
            $rootTabSet = $fields->fieldByName("Root");
            /** @var Tab $mainTab */
            $mainTab = $rootTabSet->fieldByName("Main");
            /** @var FieldList $mainFields */
            $mainFields = $mainTab->getChildren();

            // Build change password field
            $mainFields->replaceField('Password', $this->getMemberPasswordField());

            $mainFields->replaceField('Locale', new DropdownField(
                "Locale",
                _t(__CLASS__ . '.INTERFACELANG', "Interface Language", 'Language of the CMS'),
                i18n::getSources()->getKnownLocales()
            ));
            $mainFields->removeByName(static::config()->get('hidden_fields'));

            if (!static::config()->get('lock_out_after_incorrect_logins')) {
                $mainFields->removeByName('FailedLoginCount');
            }

            // Groups relation will get us into logical conflicts because
            // Members are displayed within  group edit form in SecurityAdmin
            $fields->removeByName('Groups');

            // Members shouldn't be able to directly view/edit logged passwords
            $fields->removeByName('LoggedPasswords');

            $fields->removeByName('RememberLoginHashes');

            if (Permission::check('EDIT_PERMISSIONS')) {
                // Filter allowed groups
                $groups = Group::get();
                $disallowedGroupIDs = $this->disallowedGroups();
                if ($disallowedGroupIDs) {
                    $groups = $groups->exclude('ID', $disallowedGroupIDs);
                }
                $groupsMap = array();
                foreach ($groups as $group) {
                    // Listboxfield values are escaped, use ASCII char instead of &raquo;
                    $groupsMap[$group->ID] = $group->getBreadcrumbs(' > ');
                }
                asort($groupsMap);
                $fields->addFieldToTab(
                    'Root.Main',
                    ListboxField::create('DirectGroups', Group::singleton()->i18n_plural_name())
                        ->setSource($groupsMap)
                        ->setAttribute(
                            'data-placeholder',
                            _t(__CLASS__ . '.ADDGROUP', 'Add group', 'Placeholder text for a dropdown')
                        )
                );


                // Add permission field (readonly to avoid complicated group assignment logic).
                // This should only be available for existing records, as new records start
                // with no permissions until they have a group assignment anyway.
                if ($this->ID) {
                    $permissionsField = new PermissionCheckboxSetField_Readonly(
                        'Permissions',
                        false,
                        Permission::class,
                        'GroupID',
                        // we don't want parent relationships, they're automatically resolved in the field
                        $this->getManyManyComponents('Groups')
                    );
                    $fields->findOrMakeTab('Root.Permissions', Permission::singleton()->i18n_plural_name());
                    $fields->addFieldToTab('Root.Permissions', $permissionsField);
                }
            }

            $permissionsTab = $rootTabSet->fieldByName('Permissions');
            if ($permissionsTab) {
                $permissionsTab->addExtraClass('readonly');
            }
        });

        return parent::getCMSFields();
    }
211658
public function getCMSFields()
    {
        // Obtain Field Objects (from parent):
        
        $fields = parent::getCMSFields();
        
        // Define Placeholder:
        
        $placeholder = _t(__CLASS__ . '.DROPDOWNDEFAULT', '(default)');
        
        // Create Style Fields:
        
        $fields->addFieldsToTab(
            'Root.Style',
            [
                FieldSection::create(
                    'TitleStyle',
                    $this->fieldLabel('TitleStyle'),
                    [
                        DropdownField::create(
                            'TitleLevel',
                            $this->fieldLabel('TitleLevel'),
                            $this->getTitleLevelOptions()
                        )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder)
                    ]
                )
            ]
        );
        
        // Create Options Fields:
        
        $fields->addFieldsToTab(
            'Root.Options',
            [
                FieldSection::create(
                    'TitleOptions',
                    $this->fieldLabel('TitleOptions'),
                    [
                        CheckboxField::create(
                            'HideTitle',
                            $this->fieldLabel('HideTitle')
                        )
                    ]
                )
            ]
        );
        
        // Answer Field Objects:
        
        return $fields;
    }
407733
public function getCMSFields()
    {
        $fields = parent::getCMSFields();
        $fields->addFieldsToTab(
            "Root.Main",
            array(
                UploadField::create(
                    'Image'
                )->setFolderName('Person'),
                TextField::create(
                    'Name'
                ),
                TextField::create(
                    'Title'
                ),
                TextField::create(
                    'Email'
                ),
                TextField::create(
                    'Phone'
                ),
                TextField::create(
                    'Mobile'
                ),
                HTMLEditorField::create(
                    'Description'
                ),
            )
        );
        $this->extend('updateCMSFields', $fields);
        return $fields;
    }
830950
public function getCMSFields()
    {
        $fields = parent::getCMSFields();

        $fields->addFieldToTab(
            'Root.Blocks',
            GridField::create(
                'Blocks',
                'Blocks',
                $this->Blocks(),
                GridFieldConfig_MultiClassRecord::create(
                    $this->Blocks(),
                    singleton('BlockObject_Preset')->SubClassNames
                )
            )
        );
        $this->extend('updateCMSFields', $fields);
        return $fields;
    }
195881
public function Fields()
    {
        $list     = $this->getComponents('Fields');
        $fields   = singleton(Member::class)->getMemberFormFields()->dataFields();
        $included = array();

        foreach ($list as $profileField) {
            if (!array_key_exists($profileField->MemberField, $fields)) {
                $profileField->delete();
            } else {
                $included[] = $profileField->MemberField;
            }
        }

        foreach ($fields as $name => $field) {
            if (!in_array($name, $included)) {
                $profileField = new MemberProfileField();
                $profileField->MemberField = $name;

                if (isset(self::$profile_field_defaults[$name])) {
                    $profileField->update(self::$profile_field_defaults[$name]);
                }

                $list->add($profileField);
            }
        }

        return $list;
    }
448450
protected function addLogosAndIcons(FieldList $fields)
    {
        $logoTypes = array('jpg', 'jpeg', 'png', 'gif');
        $iconTypes = array('ico');
        $appleTouchTypes = array('png');

        $fields->findOrMakeTab(
            'Root.LogosIcons',
            _t(__CLASS__ . '.LogosIconsTab', 'Logos/Icons')
        );

        $fields->addFieldToTab(
            'Root.LogosIcons',
            $logoField = Injector::inst()->create(
                FileHandleField::class,
                'Logo',
                _t(__CLASS__ . '.LogoUploadField', 'Logo, to appear in the top left')
            )
        );
        $logoField->getValidator()->setAllowedExtensions($logoTypes);

        $fields->addFieldToTab(
            'Root.LogosIcons',
            $logoRetinaField = Injector::inst()->create(
                FileHandleField::class,
                'LogoRetina',
                _t(
                    'CwpConfig.LogoRetinaUploadField',
                    'High resolution logo, to appear in the top left ' .
                    '(recommended to be twice the height and width of the standard logo)'
                )
            )
        );
        $logoRetinaField->getValidator()->setAllowedExtensions($logoTypes);

        $fields->addFieldToTab(
            'Root.LogosIcons',
            $footerLogoField = Injector::inst()->create(
                FileHandleField::class,
                'FooterLogo',
                _t(__CLASS__ . '.FooterLogoField', 'Footer logo, to appear in the footer')
            )
        );
        $footerLogoField->getValidator()->setAllowedExtensions($logoTypes);

        $fields->addFieldToTab(
            'Root.LogosIcons',
            $footerLogoRetinaField = Injector::inst()->create(
                FileHandleField::class,
                'FooterLogoRetina',
                _t(
                    'CwpConfig.FooterLogoRetinaField',
                    'High resolution footer logo (recommended twice the height and width of the standard footer logo)'
                )
            )
        );
        $footerLogoRetinaField->getValidator()->setAllowedExtensions($logoTypes);

        $fields->addFieldToTab(
            'Root.LogosIcons',
            $footerLink = TextField::create(
                'FooterLogoLink',
                _t(__CLASS__ . '.FooterLogoLinkField', 'Footer Logo link')
            )
        );
        $footerLink->setRightTitle(
            _t(
                'CwpConfig.FooterLogoLinkDesc',
                'Please include the protocol (ie, http:// or https://) unless it is an internal link.'
            )
        );

        $fields->addFieldToTab(
            'Root.LogosIcons',
            TextField::create(
                'FooterLogoDescription',
                _t(__CLASS__ . '.FooterLogoDescField', 'Footer Logo description')
            )
        );

        $fields->addFieldToTab(
            'Root.LogosIcons',
            $footerLogoSecondaryField = Injector::inst()->create(
                FileHandleField::class,
                'FooterLogoSecondary',
                _t(__CLASS__ . '.FooterLogoSecondaryField', 'Secondary Footer Logo, to appear in the footer.')
            )
        );
        $footerLogoSecondaryField->getValidator()->setAllowedExtensions($logoTypes);

        $fields->addFieldToTab('Root.LogosIcons', $footerSecondaryLink = TextField::create(
            'FooterLogoSecondaryLink',
            _t(__CLASS__ . '.FooterLogoSecondaryLinkField', 'Secondary Footer Logo link.')
        ));
        $footerSecondaryLink->setRightTitle(_t(
            'CwpConfig.FooterLogoSecondaryLinkDesc',
            'Please include the protocol (ie, http:// or https://) unless it is an internal link.'
        ));
        $fields->addFieldToTab('Root.LogosIcons', TextField::create(
            'FooterLogoSecondaryDescription',
            _t(__CLASS__ . '.FooterLogoSecondaryDescField', 'Secondary Footer Logo description')
        ));

        $fields->addFieldToTab(
            'Root.LogosIcons',
            $favIconField = Injector::inst()->create(
                FileHandleField::class,
                'FavIcon',
                _t(__CLASS__ . '.FavIconField', 'Favicon, in .ico format, dimensions of 16x16, 32x32, or 48x48')
            )
        );
        $favIconField->getValidator()->setAllowedExtensions($iconTypes);

        $fields->addFieldToTab(
            'Root.LogosIcons',
            $atIcon144 = Injector::inst()->create(
                FileHandleField::class,
                'AppleTouchIcon144',
                _t(
                    'CwpConfig.AppleIconField144',
                    'Apple Touch Web Clip and Windows 8 Tile Icon (dimensions of 144x144, PNG format)'
                )
            )
        );
        $atIcon144->getValidator()->setAllowedExtensions($appleTouchTypes);

        $fields->addFieldToTab(
            'Root.LogosIcons',
            $atIcon114 = Injector::inst()->create(
                FileHandleField::class,
                'AppleTouchIcon114',
                _t(__CLASS__ . '.AppleIconField114', 'Apple Touch Web Clip Icon (dimensions of 114x114, PNG format)')
            )
        );
        $atIcon114->getValidator()->setAllowedExtensions($appleTouchTypes);

        $fields->addFieldToTab(
            'Root.LogosIcons',
            $atIcon72 = Injector::inst()->create(
                FileHandleField::class,
                'AppleTouchIcon72',
                _t(__CLASS__ . '.AppleIconField72', 'Apple Touch Web Clip Icon (dimensions of 72x72, PNG format)')
            )
        );
        $atIcon72->getValidator()->setAllowedExtensions($appleTouchTypes);

        $fields->addFieldToTab(
            'Root.LogosIcons',
            $atIcon57 = Injector::inst()->create(
                FileHandleField::class,
                'AppleTouchIcon57',
                _t(__CLASS__ . '.AppleIconField57', 'Apple Touch Web Clip Icon (dimensions of 57x57, PNG format)')
            )
        );
        $atIcon57->getValidator()->setAllowedExtensions($appleTouchTypes);

        return $this;
    }
359500
public function getCMSFields()
    {
        // Obtain Field Objects (from parent):
        
        $fields = parent::getCMSFields();
        
        // Create Options Fields:
        
        $fields->addFieldToTab(
            'Root.Options',
            FieldSection::create(
                'RowOptions',
                $this->fieldLabel('RowOptions'),
                [
                    CheckboxField::create(
                        'NoGutters',
                        $this->fieldLabel('NoGutters')
                    ),
                    CheckboxField::create(
                        'UseContainer',
                        $this->fieldLabel('UseContainer')
                    ),
                    CheckboxField::create(
                        'EdgeToEdge',
                        $this->fieldLabel('EdgeToEdge')
                    )
                ]
            )
        );
        
        // Answer Field Objects:
        
        return $fields;
    }
1068114
public function getCMSFields()
    {
        $fields = FieldList::create(
            TabSet::create(
                "Root",
                Tab::create("Main")
            )
            ->setTitle(_t('SiteTree.TABMAIN', "Main"))
        );
        $this->extend('updateCMSFields', $fields);
        return $fields;
    }
789255
public function getCMSFields()
    {
        // Obtain Field Objects (from parent):
        
        $fields = parent::getCMSFields();
        
        // Create Main Fields:
        
        $fields->addFieldsToTab(
            'Root.Main',
            [
                TextField::create(
                    'ButtonLabel',
                    $this->fieldLabel('ButtonLabel')
                )
            ]
        );
        
        // Insert Brand Tab:
        
        $fields->insertAfter(
            Tab::create(
                'Brand',
                $this->fieldLabel('Brand')
            ),
            'Main'
        );
        
        // Create Brand Fields:
        
        $fields->addFieldsToTab(
            'Root.Brand',
            [
                TextField::create(
                    'BrandText',
                    $this->fieldLabel('BrandText')
                ),
                PageDropdownField::create(
                    'BrandPageID',
                    $this->fieldLabel('BrandPageID')
                ),
                FieldSection::create(
                    'BrandLogo',
                    $this->fieldLabel('BrandLogo'),
                    [
                        $logo = UploadField::create(
                            'BrandLogo',
                            $this->fieldLabel('BrandLogoFile')
                        ),
                        ViewportsField::create(
                            'BrandLogoWidth',
                            $this->fieldLabel('BrandLogoWidth')
                        )->setUseTextInput(true),
                        ViewportsField::create(
                            'BrandLogoHeight',
                            $this->fieldLabel('BrandLogoHeight')
                        )->setUseTextInput(true)
                    ]
                )
            ]
        );
        
        // Define Logo Field:
        
        $logo->setAllowedExtensions(['gif', 'jpg', 'jpeg', 'png', 'svg']);
        $logo->setFolderName($this->getAssetFolder());
        
        // Define Placeholder:
        
        $placeholder = _t(__CLASS__ . '.DROPDOWNDEFAULT', '(default)');
        
        // Create Style Fields:
        
        $fields->addFieldToTab(
            'Root.Style',
            FieldSection::create(
                'NavigationStyle',
                $this->fieldLabel('NavigationStyle'),
                [
                    DropdownField::create(
                        'Background',
                        $this->fieldLabel('Background'),
                        $this->getBackgroundOptions()
                    )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder),
                    DropdownField::create(
                        'Foreground',
                        $this->fieldLabel('Foreground'),
                        $this->getForegroundOptions()
                    )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder),
                    DropdownField::create(
                        'ButtonAlignment',
                        $this->fieldLabel('ButtonAlignment'),
                        $this->getButtonAlignmentOptions()
                    )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder),
                    DropdownField::create(
                        'ItemAlign',
                        $this->fieldLabel('ItemAlign'),
                        $this->getItemAlignOptions()
                    )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder),
                    DropdownField::create(
                        'ItemJustify',
                        $this->fieldLabel('ItemJustify'),
                        $this->getItemJustifyOptions()
                    )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder),
                    DropdownField::create(
                        'Position',
                        $this->fieldLabel('Position'),
                        $this->getPositionOptions()
                    )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder)
                ]
            )
        );
        
        // Create Options Fields:
        
        $fields->addFieldToTab(
            'Root.Options',
            FieldSection::create(
                'NavigationOptions',
                $this->fieldLabel('NavigationOptions'),
                [
                    ViewportField::create(
                        'ExpandOn',
                        $this->fieldLabel('ExpandOn')
                    )->setRightTitle(
                        _t(
                            __CLASS__ . '.EXPANDONRIGHTTITLE',
                            'Specifies the viewport size to expand collapsed content.'
                        )
                    ),
                    CheckboxField::create(
                        'BrandLinkDisabled',
                        $this->fieldLabel('BrandLinkDisabled')
                    )
                ]
            )
        );
        
        // Answer Field Objects:
        
        return $fields;
    }
759308
public function getCMSFields()
    {
        $fields = parent::getCMSFields();
        $fields->addFieldsToTab(
            "Root.Main",
            array(
                DropdownField::create(
                    'ShowHome',
                    'Show home',
                    array(
                        "1" => "Yes",
                        "0" => "No"
                    ),
                    1
                )
            )
        );

        $this->extend('updateCMSFields', $fields);

        return $fields;
    }
129750
public function getCMSFields()
    {
        $this->beforeUpdateCMSFields(function (FieldList $fields) {
            $fields
                ->fieldByName('Root.Main.HTML')
                ->setTitle(_t(__CLASS__ . '.ContentLabel', 'Content'));
        });
        return parent::getCMSFields();
    }
965369
public function getCMSFields()
    {
        // Obtain Field Objects (from parent):
        
        $fields = parent::getCMSFields();
        
        // Create Style Fields:
        
        $fields->addFieldToTab(
            'Root.Style',
            FieldSection::create(
                'ButtonStyle',
                $this->fieldLabel('ButtonStyle'),
                [
                    DropdownField::create(
                        'ButtonSize',
                        $this->fieldLabel('ButtonSize'),
                        $this->getButtonSizeOptions()
                    ),
                    DropdownField::create(
                        'ButtonAnnotation',
                        $this->fieldLabel('ButtonAnnotation'),
                        $this->getButtonAnnotationOptions()
                    )
                ]
            )
        );
        
        // Answer Field Objects:
        
        return $fields;
    }
729813
public function getCMSFields()
    {
        // Obtain Field Objects (from parent):
        
        $fields = parent::getCMSFields();
        
        // Create Main Fields:
        
        $fields->addFieldsToTab(
            'Root.Main',
            [
                UploadField::create(
                    'Image',
                    $this->fieldLabel('Image')
                )->setAllowedFileCategories('image')->setFolderName($this->getAssetFolder()),
                HTMLEditorField::create(
                    'Caption',
                    $this->fieldLabel('Caption')
                )->setRows(10)
            ],
            'LinkTo'
        );
        
        // Create Options Fields:
        
        $fields->addFieldToTab(
            'Root.Options',
            FieldSection::create(
                'SlideOptions',
                $this->fieldLabel('SlideOptions'),
                [
                    CheckboxField::create(
                        'HideTitle',
                        $this->fieldLabel('HideTitle')
                    ),
                    CheckboxField::create(
                        'HideImage',
                        $this->fieldLabel('HideImage')
                    ),
                    CheckboxField::create(
                        'HideCaption',
                        $this->fieldLabel('HideCaption')
                    ),
                    CheckboxField::create(
                        'LinkDisabled',
                        $this->fieldLabel('LinkDisabled')
                    ),
                    CheckboxField::create(
                        'TitleAfterCaption',
                        $this->fieldLabel('TitleAfterCaption')
                    ),
                    CheckboxField::create(
                        'LinkInFooter',
                        $this->fieldLabel('LinkInFooter')
                    ),
                    CheckboxField::create(
                        'ButtonLink',
                        $this->fieldLabel('ButtonLink')
                    ),
                    TextField::create(
                        'ButtonLabel',
                        $this->fieldLabel('ButtonLabel')
                    )
                ]
            )
        );
        
        // Answer Field Objects:
        
        return $fields;
    }