package Gems
subpackage Snippets\Mail
copyright Copyright (c) 2013 Erasmus MC
license New BSD License
since Class available since version 1.6.2
inherited_from \Gems_Snippets_Mail_MailFormSnippet

 Methods

afterRegistry()

afterRegistry() 
inherited_from \Gems_Snippets_Mail_MailFormSnippet::afterRegistry()

afterRegistry()

afterRegistry() 
Inherited

Get the comm Model

createModel() 
Inherited

Create the snippets content

getHtmlOutput(\Zend_View_Abstract $view) : \MUtil_Html_HtmlInterface
Inherited

This is a stub function either override getHtmlOutput() or override render()

Parameters

$view

\Zend_View_Abstract

Just in case it is needed here

Returns

\MUtil_Html_HtmlInterfaceSomething that can be rendered

When hasHtmlOutput() is false a snippet user should check for a redirectRoute.

getRedirectRoute() : mixed
Inherited

When hasHtmlOutput() is true this functions should not be called.

see

Returns

mixedNothing or either an array or a string that is acceptable for Redector->gotoRoute()

getTitle()

getTitle() 
Inherited

Returns the name of the user mentioned in this token in human-readable format

getTokenName(array $tokenData = null) : string

Parameters

$tokenData

array

Returns

string

The place to check if the data set in the snippet is valid to generate the snippet.

hasHtmlOutput() : boolean
Inherited

When invalid data should result in an error, you can throw it here but you can also perform the check in the checkRegistryRequestsAnswers() function from the \MUtil_Registry_TargetInterface.

Returns

boolean

Adds elements from the model to the bridge that creates the form.

addFormElements(\MUtil_Model_Bridge_FormBridgeInterface $bridge, \MUtil_Model_ModelAbstract $model) 

Overrule this function to add different elements to the browse table, without having to recode the core table building code.

inherited_from \Gems_Snippets_Mail_MailFormSnippet::addFormElements()

Parameters

$bridge

\MUtil_Model_Bridge_FormBridgeInterface

$model

\MUtil_Model_ModelAbstract

Adds elements from the model to the bridge that creates the form.

addFormElements(\MUtil_Model_Bridge_FormBridgeInterface $bridge, \MUtil_Model_ModelAbstract $model) 
Inherited

Overrule this function to add different elements to the browse table, without having to recode the core table building code.

Parameters

$bridge

\MUtil_Model_Bridge_FormBridgeInterface

$model

\MUtil_Model_ModelAbstract

beforeDisplay()

beforeDisplay() 
Inherited

Create a new form instance

createForm() 
Inherited

Create the options for the Select

createFromSelect($elementName = 'from', $label = ''
Inherited

Parameters

$elementName

$label

Create the option values with links for the select

createMultiOption(array $requestData, string $name, string $email, string $extra = null, boolean $disabledTitle = false, boolean $menuFind = false) : string
Inherited

Parameters

$requestData

array

Needed for the links

$name

string

Sender name

$email

string

Sender Email

$extra

string

Extra info after the mail address

$disabledTitle

boolean

Is the link disabled

$menuFind

boolean

Find the url in the menu?

Returns

stringOptions

createToElement()

createToElement() 

Returns the model, always use this function

getModel() : \MUtil_Model_ModelAbstract
Inherited

Returns

\MUtil_Model_ModelAbstract

Get the default token Id, from an array of tokenids. Usually the first token.

getSingleTokenData() 

Makes sure there is a form.

loadForm() 
Inherited

Hook that loads the form data from $_POST or the model

loadFormData() 

Or from whatever other source you specify here.

inherited_from \Gems_Snippets_Mail_MailFormSnippet::loadFormData()

Hook that loads the form data from $_POST or the model

loadFormData() 
Inherited

Or from whatever other source you specify here.

processForm()

processForm() 
Inherited

sendMail()

sendMail() 
inherited_from \Gems_Snippets_Mail_MailFormSnippet::sendMail()

sendMail()

sendMail() 
Inherited

Set the route destination after the mail is sent

setAfterSendRoute() 
Inherited

createToText()

createToText(array $tokenData, $disabled) 

Parameters

$tokenData

$disabled

 Properties

 

$formTitle

$formTitle 

Default

 

$afterSendRouteUrl

$afterSendRouteUrl 

Default

 

$currentUser

$currentUser : \Gems_User_User

Default

 

$db

$db : \Zend_Db_Adapter_Abstract

Default

 

$form

$form 

Default

 

The form class

$formClass : string

Default

'formTable'
 

$formData

$formData 

Default

array()
 

$fromOptions

$fromOptions 

Default

 

$identifier

$identifier 

Default

inherited_from \Gems_Snippets_Mail_MailFormSnippet::identifier
 

$identifier

$identifier 

Default

 

Class of every label

$labelClass : string

Default

'label'
 

$loader

$loader 

Default

inherited_from \Gems_Snippets_Mail_MailFormSnippet::loader
 

$loader

$loader : \Gems_Loader

Default

 

$mailElements

$mailElements : \Gems_Mail_MailElements

Default

 

The mailtarget

$mailTarget : string

Default

 

$menu

$menu : \Gems_Menu

Default

 

$model

$model 

Default

 

$multipleTokenData

$multipleTokenData 

Default

 

$otherTokenData

$otherTokenData 

Default

 

$project

$project : \Gems_Project_ProjectSettings

Default

 

The name of the action to forward to after form completion

$routeAction : string

Default

'index'
 

Is it only allowed to select a template, or can you edit the text after.

$templateOnly : boolean

Default

 

$view

$view : \Zend_View

Default