Return the mailfields for a password reset template
@return array
429210
protected function getResetPasswordMailFields()
    {
    	if ($this->user->getUserId()) {
    		$result = $this->user->getResetPasswordMailFields();
    	} else {
    		$result['reset_key'] = '';
        	$result['reset_url'] = '';

    	}
    	return $result;
    }
1249816
public function getEmailResetPassword()
    {
        if ($this->offsetExists('email') && isset($this->email['resetPasswordTemplate'])) {
            return (string) $this->email['resetPasswordTemplate'];
        }
        return false;
    }
1180264
protected function getConfigLinkFields()
    {
        return array(
            'tellAboutBasicSettings' => array(
                'type' => 'markup',
                'value' => sprintf($this->t('desc_basicSettings'), $this->t('config_form_link_text'), $this->t('menu_basicSettings')),
            ),
            'basicSettingsLink' => array(
                'type' => 'markup',
                'value' => sprintf($this->t('button_link'), $this->t('config_form_link_text') , $this->shopCapabilities->getLink('config')),
            ),
        );
    }
749823
protected function _getMergedAddressFields()
    {
        $sDelAddress = '';
        $sDelAddress .= $this->oxuser__oxcompany;
        $sDelAddress .= $this->oxuser__oxusername;
        $sDelAddress .= $this->oxuser__oxfname;
        $sDelAddress .= $this->oxuser__oxlname;
        $sDelAddress .= $this->oxuser__oxstreet;
        $sDelAddress .= $this->oxuser__oxstreetnr;
        $sDelAddress .= $this->oxuser__oxaddinfo;
        $sDelAddress .= $this->oxuser__oxustid;
        $sDelAddress .= $this->oxuser__oxcity;
        $sDelAddress .= $this->oxuser__oxcountryid;
        $sDelAddress .= $this->oxuser__oxstateid;
        $sDelAddress .= $this->oxuser__oxzip;
        $sDelAddress .= $this->oxuser__oxfon;
        $sDelAddress .= $this->oxuser__oxfax;
        $sDelAddress .= $this->oxuser__oxsal;

        return $sDelAddress;
    }
79782
public function getCMSFields()
    {
        $fields = parent::getCMSFields();
        $fields->addFieldsToTab(
            "Root.Main",
            array(
                TextareaField::create(
                    'Title'
                )->setRows(1),
                HTMLEditorField::create(
                    'Content'
                )
            )
        );

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

        return $fields;
    }
121918
public function getCMSFields()
    {
        /** @var FieldList $fields */
        $fields = parent::getCMSFields();

        // Get protector
        $protector = FormSpamProtectionExtension::get_protector();
        if (!$protector) {
            return $fields;
        }

        if ($this->Parent()->Fields() instanceof UnsavedRelationList) {
            return $fields;
        }

        // Each other text field in this group can be assigned a field mapping
        $mapGroup = FieldGroup::create()
            ->setTitle(_t(__CLASS__.'.SPAMFIELDMAPPING', 'Spam Field Mapping'))
            ->setName('SpamFieldMapping')
            ->setDescription(_t(
                __CLASS__.'.SPAMFIELDMAPPINGDESCRIPTION',
                'Select the form fields that correspond to any relevant spam protection identifiers'
            ));

        // Generate field specific settings
        $mappableFields = FormSpamProtectionExtension::config()->get('mappable_fields');
        $mappableFieldsMerged = array_combine($mappableFields, $mappableFields);
        foreach ($this->getCandidateFields() as $otherField) {
            $mapSetting = "Map-{$otherField->Name}";
            $fieldOption = DropdownField::create(
                'spammap-' . $mapSetting,
                $otherField->Title,
                $mappableFieldsMerged,
                $this->spamMapValue($mapSetting)
            )->setEmptyString('');
            $mapGroup->push($fieldOption);
        }
        $fields->addFieldToTab('Root.Main', $mapGroup);

        return $fields;
    }
999394
public function getHtmlFields()
    {
        $htmlFields = '';

        foreach ($this->fields as $field) {
            if (!$field->isOnFormView) {
                continue;
            }

            $parser = new ValidationParser($field->validationRules);

            if (in_array($field->htmlType, ['select', 'multipleSelect'])) {
                $htmlFields .= $this->getSelectHtmlField($field, $parser);
            } elseif (in_array($field->htmlType, ['radio', 'checkbox'])) {
                $htmlFields .= $this->getPickItemsHtml($field, $parser);
            } elseif ($field->htmlType == 'textarea') {
                $htmlFields .= $this->getTextareaHtmlField($field, $parser);
            } elseif ($field->htmlType == 'password') {
                $htmlFields .= $this->getPasswordHtmlField($field, $parser);
            } elseif ($field->htmlType == 'file') {
                $htmlFields .= $this->getFileHtmlField($field);
            } elseif ($field->htmlType == 'selectRange') {
                $htmlFields .= $this->getSelectRangeHtmlField($field);
            } elseif ($field->htmlType == 'selectMonth') {
                $htmlFields .= $this->getSelectMonthHtmlField($field);
            } else {
                $htmlFields .= $this->getStandardHtmlField($field, $parser);
            }
        }

        $this->replaceStandardLabels($htmlFields, $this->viewLabels->getLabels());

        return $htmlFields;
    }
10077
public function getTemplates()
    {
        $templates = array();

        if ($handle = opendir(Primer::$PATTERN_PATH . '/templates')) {
            while (false !== ($entry = readdir($handle))) {
                if (substr($entry, 0, 1) !== '.') {
                    $templates[] = array(
                        'id' => $entry,
                        'title' => preg_replace('/[^A-Za-z0-9]/', ' ', $entry),
                    );
                }
            }

            closedir($handle);
        }

        return $templates;
    }
186900
public function getNotificationTemplateData()
    {
        $fields = $this->Context->getValues();
        if (!is_array($fields)) {
            $fields = [];
        }
        $fields['Content'] = $this->Content;
        return $fields;
    }
742752
public function getMailFields($locale = null)
    {
        $org         = $this->getBaseOrganization();
        $orgResults  = $org->getMailFields();
        $projResults = $this->project->getMailFields();

        $result['bcc']            = $projResults['project_bcc'];
        $result['email']          = $this->getEmailAddress();
        $result['first_name']     = $this->_getVar('user_first_name');
        $result['from']           = $this->getFrom();
        $result['full_name']      = trim($this->getGenderHello($locale) . ' ' . $this->getFullName());
        $result['greeting']       = $this->getGreeting($locale);
        $result['last_name']      = ltrim($this->_getVar('user_surname_prefix') . ' ') . $this->_getVar('user_last_name');
        $result['login_url']      = $orgResults['organization_login_url'];
        $result['name']           = $this->getFullName();
        $result['login_name']     = $this->getLoginName();

        $result = $result + $orgResults + $projResults;

        $result['reset_ask']      = $orgResults['organization_login_url'] . '/index/resetpassword';
        $result['reset_in_hours'] = $this->definition->getResetKeyDurationInHours();
        $result['reply_to']       = $result['from'];
        $result['to']             = $result['email'];

        return $result;
    }
860818
public function getCMSFields()
    {
        $commentField = $this->AllowHtml ? HTMLEditorField::class : TextareaField::class;
        $fields = new FieldList(
            $this
                ->obj('Created')
                ->scaffoldFormField($this->fieldLabel('Created'))
                ->performReadonlyTransformation(),
            TextField::create('Name', $this->fieldLabel('Name')),
            $commentField::create('Comment', $this->fieldLabel('Comment')),
            EmailField::create('Email', $this->fieldLabel('Email')),
            TextField::create('URL', $this->fieldLabel('URL')),
            FieldGroup::create(array(
                CheckboxField::create('Moderated', $this->fieldLabel('Moderated')),
                CheckboxField::create('IsSpam', $this->fieldLabel('IsSpam')),
            ))
                ->setTitle(_t(__CLASS__ . '.OPTIONS', 'Options'))
                ->setDescription(_t(
                    __CLASS__ . '.OPTION_DESCRIPTION',
                    'Unmoderated and spam comments will not be displayed until approved'
                ))
        );

        // Show member name if given
        if (($author = $this->Author()) && $author->exists()) {
            $fields->insertAfter(
                TextField::create('AuthorMember', $this->fieldLabel('Author'), $author->Title)
                    ->performReadonlyTransformation(),
                'Name'
            );
        }

        // Show parent comment if given
        if (($parent = $this->ParentComment()) && $parent->exists()) {
            $fields->push(new HeaderField(
                'ParentComment_Title',
                _t(__CLASS__ . '.ParentComment_Title', 'This comment is a reply to the below')
            ));
            // Created date
            // FIXME - the method setName in DatetimeField is not chainable, hence
            // the lack of chaining here
            $createdField = $parent
                ->obj('Created')
                ->scaffoldFormField($parent->fieldLabel('Created'));
            $createdField->setName('ParentComment_Created');
            $createdField->setValue($parent->Created);
            $createdField->performReadonlyTransformation();
            $fields->push($createdField);

            // Name (could be member or string value)
            $fields->push(
                $parent
                    ->obj('AuthorName')
                    ->scaffoldFormField($parent->fieldLabel('AuthorName'))
                    ->setName('ParentComment_AuthorName')
                    ->setValue($parent->getAuthorName())
                    ->performReadonlyTransformation()
            );

            // Comment body
            $fields->push(
                $parent
                    ->obj('EscapedComment')
                    ->scaffoldFormField($parent->fieldLabel(self::class))
                    ->setName('ParentComment_EscapedComment')
                    ->setValue($parent->Comment)
                    ->performReadonlyTransformation()
            );
        }

        $this->extend('updateCMSFields', $fields);
        return $fields;
    }
1178190
public function getCMSFields() {
		preg_match("/<body[^>]*>(.*?)<\/body>/is", $this->Body, $matches);
		$contents = $matches ? $matches[1] : "";

		$f = FieldList::create(
			ReadonlyField::create('To'),
			ReadonlyField::create('Subject'),
			ReadonlyField::create('BCC'),
			ReadonlyField::create('CC'),
			HeaderField::create('Email contents', 5),
			LiteralField::create('BodyContents', "<div class='field'>{$contents}</div>")
		);

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

		return $f;
	}
1356560
public function getAttributes()
    {
        return [
            Attributes\IdAttribute::make(),
            Attributes\TextAttribute::make('name')
                ->setUnique(true)
                ->setRequired(true),
            Attributes\EmailAttribute::make('email')
                ->setRequired(true)
                ->setUnique(true),
            Attributes\PasswordAttribute::make('password')
                ->setRequired(true),
            Attributes\BooleanAttribute::make('enabled'),
            Attributes\TextAttribute::make('token')
                ->setDefault(function ($entity, $attribute) {
                    return $attribute->getManager()->getRepository()->generateToken();
                })
                ->setFillable(false),
            Attributes\EnumAttribute::make('role', ['user', 'admin']),
            Attributes\CreatedAtAttribute::make(),
            Attributes\UpdatedAtAttribute::make(),
            Attributes\DeletedAtAttribute::make(),
        ];
    }
469176
public function getMailHeaders()
    {
        $headers = [];

        $html = $this->getHtml();
        $text = $this->getText();
        $subject = $this->getSubject();

        if ($html != "" || count($this->attachments) > 0) {
            $mime = new MimeDocument("multipart/alternative", crc32($html) . crc32($text) . crc32($subject));
            $headers = $mime->getHeaders();
        } else {
            $headers["Content-Type"] = "text/plain; charset=utf-8";
        }

        $headers["From"] = (string)$this->getSender();
        $headers["Subject"] = $subject;

        return $headers;
    }
551036
protected function getMailerParams()
    {
        $app = $this->getApp();

        return [
            'base_url' => $app['base_url'],
            'siteEmail' => $app['config']->get('app.email'),
            'email' => $this->email,
            'username' => $this->name(true),
            'to' => [
                [
                    'email' => $this->email,
                    'name' => $this->name(true),
                ],
            ],
        ];
    }
654212
public function GetActiveSettingAsHiddenInputField()
    {
        $sHTML = '';
        if (is_array($this->aActiveFilterData)) {
            reset($this->aActiveFilterData);
            foreach ($this->aActiveFilterData as $sItemName) {
                $sHTML .= '<input type="hidden" name="'.TGlobal::OutHTML($this->GetURLInputName()).'[]" value="'.TGlobal::OutHTML($sItemName).'" />';
            }
            reset($this->aActiveFilterData);
        }

        return $sHTML;
    }
1274761
protected function getFormFields()
    {
        $request = $this->getRequest();
        if ($request->getVar('BackURL')) {
            $backURL = $request->getVar('BackURL');
        } else {
            $backURL = $request->getSession()->get('BackURL');
        }

        $label = Member::singleton()->fieldLabel(Member::config()->get('unique_identifier_field'));
        $fields = FieldList::create(
            HiddenField::create("AuthenticationMethod", null, $this->getAuthenticatorClass(), $this),
            // Regardless of what the unique identifer field is (usually 'Email'), it will be held in the
            // 'Email' value, below:
            // @todo Rename the field to a more generic covering name
            $emailField = TextField::create("Email", $label, null, null, $this),
            PasswordField::create("Password", _t('SilverStripe\\Security\\Member.PASSWORD', 'Password'))
        );
        $emailField->setAttribute('autofocus', 'true');

        if (Security::config()->get('remember_username')) {
            $emailField->setValue($this->getSession()->get('SessionForms.MemberLoginForm.Email'));
        } else {
            // Some browsers won't respect this attribute unless it's added to the form
            $this->setAttribute('autocomplete', 'off');
            $emailField->setAttribute('autocomplete', 'off');
        }
        if (Security::config()->get('autologin_enabled')) {
            $fields->push(
                CheckboxField::create(
                    "Remember",
                    _t('SilverStripe\\Security\\Member.KEEPMESIGNEDIN', "Keep me signed in")
                )->setAttribute(
                    'title',
                    _t(
                        'SilverStripe\\Security\\Member.REMEMBERME',
                        "Remember me next time? (for {count} days on this device)",
                        [ 'count' => RememberLoginHash::config()->uninherited('token_expiry_days') ]
                    )
                )
            );
        }

        if (isset($backURL)) {
            $fields->push(HiddenField::create('BackURL', 'BackURL', $backURL));
        }

        return $fields;
    }