本文整理汇总了PHP中SilverStripe\ORM\DataObject::getFrontendFields方法的典型用法代码示例。如果您正苦于以下问题:PHP DataObject::getFrontendFields方法的具体用法?PHP DataObject::getFrontendFields怎么用?PHP DataObject::getFrontendFields使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SilverStripe\ORM\DataObject
的用法示例。
在下文中一共展示了DataObject::getFrontendFields方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMemberFormFields
/**
* Returns the fields for the member form - used in the registration/profile module.
* It should return fields that are editable by the admin and the logged-in user.
*
* @return FieldList Returns a {@link FieldList} containing the fields for
* the member form.
*/
public function getMemberFormFields()
{
$fields = parent::getFrontendFields();
$fields->replaceField('Password', $this->getMemberPasswordField());
$fields->replaceField('Locale', new DropdownField('Locale', $this->fieldLabel('Locale'), i18n::get_existing_translations()));
$fields->removeByName(static::config()->hidden_fields);
$fields->removeByName('FailedLoginCount');
$this->extend('updateMemberFormFields', $fields);
return $fields;
}