PHP Class OphCoTherapyapplication_Processor

(C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011 (C) OpenEyes Foundation, 2011-2013 This file is part of OpenEyes. OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see .
Author: OpenEyes ([email protected])
Afficher le fichier Open project: openeyes/openeyes Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Event $event )
generatePreviewPdf ( CController $controller ) : OETCPDF Generate PDFs in a wrapper for preview purposes.
getApplicationStatus ( ) : string Returns status of applicant: pending, sent, re-opened.
getEyeNameById ( $eye_id ) : string
getLeftSentEmails ( ) : OphCoTherapyapplication_Email[]
getPDFContentForSide ( $controller, $template_data, $side )
getProcessWarnings ( ) : array Get any relevant warnings.
getRightSentEmails ( ) : OphCoTherapyapplication_Email[]
getSiteName ( )
hasEmailRecipients ( )
isEventNonCompliant ( ) : boolean return boolean to indicate whether the given event is non compliant or not.
processEvent ( CController $controller, User $notify_user = null ) : boolean processes the application for the event with id $event_id returns a boolean to indicate whether this was successful or not.

Méthodes protégées

Méthode Description
createAndSavePdfForSide ( CController $controller, array $template_data, string $side ) : ProtectedFile | null create the PDF file as a ProtectedFile for the given side.
generateEmailForSide ( CController $controller, array $template_data, string $side ) : string generate the email text for the given side.
getElement ( string $class_name ) : BaseEventTypeElement | null Get an element object by class name.

Private Methods

Méthode Description
getEmailRecipients ( $service_info, $recipient_type )
getServiceInfo ( )
getSideSpecificTemplateData ( string $side ) : array
getTemplateData ( ) : array
getViewPath ( ) : string
processEventForEye ( CController $controller, array $template_data, integer $eye_id, User $notify_user = null ) : boolean

Method Details

__construct() public méthode

public __construct ( Event $event )
$event Event Must be an OphCoTherapyapplication event

createAndSavePdfForSide() protected méthode

create the PDF file as a ProtectedFile for the given side.
protected createAndSavePdfForSide ( CController $controller, array $template_data, string $side ) : ProtectedFile | null
$controller CController
$template_data array
$side string
Résultat ProtectedFile | null

generateEmailForSide() protected méthode

generate the email text for the given side.
protected generateEmailForSide ( CController $controller, array $template_data, string $side ) : string
$controller CController
$template_data array
$side string
Résultat string

generatePreviewPdf() public méthode

Note that this is currently only used for non-compliant applications.
public generatePreviewPdf ( CController $controller ) : OETCPDF
$controller CController
Résultat OETCPDF

getApplicationStatus() public méthode

Returns status of applicant: pending, sent, re-opened.
public getApplicationStatus ( ) : string
Résultat string

getElement() protected méthode

We could potentially add a caching layer here if performance becomes a problem, but would have to watch out for stale data
protected getElement ( string $class_name ) : BaseEventTypeElement | null
$class_name string
Résultat BaseEventTypeElement | null

getEyeNameById() public méthode

public getEyeNameById ( $eye_id ) : string
$eye_id
Résultat string

getLeftSentEmails() public méthode

public getLeftSentEmails ( ) : OphCoTherapyapplication_Email[]
Résultat OphCoTherapyapplication_Email[]

getPDFContentForSide() public méthode

public getPDFContentForSide ( $controller, $template_data, $side )

getProcessWarnings() public méthode

Get any relevant warnings.
public getProcessWarnings ( ) : array
Résultat array

getRightSentEmails() public méthode

public getRightSentEmails ( ) : OphCoTherapyapplication_Email[]
Résultat OphCoTherapyapplication_Email[]

getSiteName() public méthode

public getSiteName ( )

hasEmailRecipients() public méthode

public hasEmailRecipients ( )

isEventNonCompliant() public méthode

return boolean to indicate whether the given event is non compliant or not.
See also: Element_OphCoTherapyapplication_PatientSuitability::isNonCompliant()
public isEventNonCompliant ( ) : boolean
Résultat boolean

processEvent() public méthode

processes the application for the event with id $event_id returns a boolean to indicate whether this was successful or not.
public processEvent ( CController $controller, User $notify_user = null ) : boolean
$controller CController
$notify_user User
Résultat boolean