SilverStripe\UserForms\Model\Recipient\EmailRecipient
A Form can have multiply members / emails to email the submission to and custom subjects
Synopsis
class EmailRecipient
extends DataObject
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static array $has_many = ;
- private static array $owns = ;
- private static array $cascade_deletes = ;
- private static array $summary_fields = ;
- private static string $table_name = 'UserDefinedForm_EmailRecipient';
- private static boolean $versioned_gridfield_extensions = false;
- private static bool $allow_unbound_recipient_fields = false;
- // methods
- public void requireDefaultRecords()
- public void onBeforeWrite()
- public void summaryFields()
- protected UserDefinedForm|UserForm|null getFormParent()
- public void getTitle()
- protected GridFieldConfig getRulesConfig()
- public FieldList getCMSFields()
- public bool canCreate()
- protected SiteTree getCanCreateContext()
- public void canView()
- public void canEdit()
- public boolean canDelete()
- public bool canSend()
- public boolean emailTemplateExists()
- public string getEmailBodyContent()
- public array getEmailTemplateDropdownValues()
- public ValidationResult validate()
- protected FieldGroup|TextField getSubjectCMSFields()
- protected FieldGroup|TextField getEmailToCMSFields()
- protected TextField getEmailFromCMSFields()
- protected FieldGroup|TextField getEmailReplyToCMSFields()
- protected DataList|null getMultiOptionFields()
- protected ArrayList|null getValidSubjectFields()
- protected DataList|null getValidEmailFromFields()
- protected ArrayList|DataList|null getValidEmailToFields()
- protected void getUnsavedFormLiteralField()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
- $allow_unbound_recipient_fields
—
SilverStripe\UserForms\Model\Recipient\bool
Setting this to true will allow you to select "risky" fields as email recipient, such as free-text entry fields. - $cascade_deletes
- $db
- $has_many
- $has_one
- $owns
- $summary_fields
- $table_name
-
$versioned_gridfield_extensions
Disable versioned GridField to ensure that it doesn't interfere with {@link UserFormRecipientItemRequest}
Methods
protected
- getCanCreateContext() — Helper method to check the parent for this object
- getEmailFromCMSFields()
- getEmailReplyToCMSFields()
- getEmailToCMSFields()
- getFormParent() — Get instance of UserForm when editing in getCMSFields
- getMultiOptionFields()
- getRulesConfig() — Generate a gridfield config for editing filter rules
- getSubjectCMSFields()
- getUnsavedFormLiteralField()
- getValidEmailFromFields()
- getValidEmailToFields()
- getValidSubjectFields()
public
- canCreate() — Return whether a user can create an object of this type
- canDelete()
- canEdit()
- canSend() — Determine if this recipient may receive notifications for this submission
- canView()
- emailTemplateExists() — Make sure the email template saved against the recipient exists on the file system.
- getCMSFields()
- getEmailBodyContent() — Get the email body for the current email format
- getEmailTemplateDropdownValues() — Gets a list of email templates suitable for populating the email template dropdown.
- getTitle()
- onBeforeWrite()
- requireDefaultRecords()
- summaryFields()
- validate() — Validate that valid email addresses are being used