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

 Methods

afterRegistry()

afterRegistry() 

Get the comm Model

createModel() 

Create the snippets content

getHtmlOutput(\Zend_View_Abstract $view) : \MUtil_Html_HtmlInterface

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

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() 

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

hasHtmlOutput() : boolean

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.

Parameters

$bridge

\MUtil_Model_Bridge_FormBridgeInterface

$model

\MUtil_Model_ModelAbstract

beforeDisplay()

beforeDisplay() 

Create a new form instance

createForm() 

Create the options for the Select

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

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

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

Returns the model, always use this function

getModel() : \MUtil_Model_ModelAbstract

Returns

\MUtil_Model_ModelAbstract

Makes sure there is a form.

loadForm() 

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

loadFormData() 

Or from whatever other source you specify here.

processForm()

processForm() 

sendMail()

sendMail() 

Set the route destination after the mail is sent

setAfterSendRoute() 

 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

 

Class of every label

$labelClass : string

Default

'label'
 

$loader

$loader : \Gems_Loader

Default

 

$mailElements

$mailElements : \Gems_Mail_MailElements

Default

 

The mailtarget

$mailTarget : string

Default

 

$menu

$menu : \Gems_Menu

Default

 

$model

$model 

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