Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
PKPEmailTemplateDAO Class Reference
Inheritance diagram for PKPEmailTemplateDAO:
DAO EmailTemplateDAO

Public Member Functions

_returnBaseEmailTemplateFromRow ($row)
 
_returnEmailTemplateFromRow ($row, $isCustomTemplate=null)
 
_returnLocaleEmailTemplateFromRow ($row)
 
 customTemplateExistsByKey ($emailKey, $assocType, $assocId)
 
 deleteDefaultEmailTemplatesByLocale ($locale)
 
 deleteEmailTemplateByKey ($emailKey, $assocType, $assocId)
 
 deleteEmailTemplatesByAssoc ($assocType, $assocId)
 
 deleteEmailTemplatesByLocale ($locale)
 
 getBaseEmailTemplate ($emailKey, $assocType, $assocId)
 
 getCustomTemplateKeys ($assocType, $assocId)
 
 getEmailTemplate ($emailKey, $locale, $assocType, $assocId)
 
 getEmailTemplates ($locale, $assocType, $assocId, $rangeInfo=null)
 
 getInsertId ()
 
 getLocaleEmailTemplate ($emailKey, $assocType, $assocId)
 
 insertBaseEmailTemplate (&$emailTemplate)
 
 insertLocaleEmailTemplate (&$emailTemplate)
 
 installEmailTemplateData ($templateDataFile, $returnSql=false, $emailKey=null)
 
 installEmailTemplates ($templatesFile, $returnSql=false, $emailKey=null, $skipExisting=false)
 
 PKPEmailTemplateDAO ()
 
 templateExistsByKey ($emailKey, $assocType=null, $assocId=null)
 
 updateBaseEmailTemplate (&$emailTemplate)
 
 updateLocaleEmailTemplate (&$emailTemplate)
 
 updateLocaleEmailTemplateData (&$emailTemplate)
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getType ($value)
 
 replace ($table, $arrFields, $keyCols)
 
retrieve ($sql, $params=false, $callHooks=true)
 
retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true)
 
retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
 
retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true)
 
 setCacheDir ()
 
 setDataSource (&$dataSource)
 
 update ($sql, $params=false, $callHooks=true, $dieOnError=true)
 
 updateDataObjectSettings ($tableName, &$dataObject, $idArray)
 

Additional Inherited Members

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null)
 
- Public Attributes inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table= '', $id= '')
 

Detailed Description

Operations for retrieving and modifying Email Template objects.

See Also
PKPEmailTemplate

Definition at line 18 of file PKPEmailTemplateDAO.inc.php.

Member Function Documentation

& PKPEmailTemplateDAO::_returnBaseEmailTemplateFromRow (   $row)

Internal function to return an email template object from a row.

Parameters
$rowarray
Returns
BaseEmailTemplate

Definition at line 194 of file PKPEmailTemplateDAO.inc.php.

References HookRegistry\call().

Referenced by getBaseEmailTemplate().

& PKPEmailTemplateDAO::_returnEmailTemplateFromRow (   $row,
  $isCustomTemplate = null 
)

Internal function to return an email template object from a row.

Parameters
$rowarray
Returns
EmailTemplate

Definition at line 286 of file PKPEmailTemplateDAO.inc.php.

References HookRegistry\call().

Referenced by getEmailTemplate(), and getEmailTemplates().

& PKPEmailTemplateDAO::_returnLocaleEmailTemplateFromRow (   $row)

Internal function to return an email template object from a row.

Parameters
$rowarray
Returns
LocaleEmailTemplate

Definition at line 215 of file PKPEmailTemplateDAO.inc.php.

References HookRegistry\call(), and DAO\retrieve().

Referenced by getLocaleEmailTemplate().

PKPEmailTemplateDAO::customTemplateExistsByKey (   $emailKey,
  $assocType,
  $assocId 
)

Check if a custom template exists with the given email key for a journal/conference/...

Parameters
$emailKeystring
$assocTypeint
$assocIdint
Returns
boolean

Definition at line 608 of file PKPEmailTemplateDAO.inc.php.

References DAO\retrieve().

PKPEmailTemplateDAO::deleteDefaultEmailTemplatesByLocale (   $locale)

Delete all default email templates for a specific locale.

Parameters
$localestring

Definition at line 548 of file PKPEmailTemplateDAO.inc.php.

References DAO\update().

PKPEmailTemplateDAO::deleteEmailTemplateByKey (   $emailKey,
  $assocType,
  $assocId 
)

Delete an email template by key.

Parameters
$emailKeystring
$assocTypeint
$assocIdint

Definition at line 430 of file PKPEmailTemplateDAO.inc.php.

References DAO\update().

PKPEmailTemplateDAO::deleteEmailTemplatesByAssoc (   $assocType,
  $assocId 
)

Delete all email templates for a specific journal/conference/...

Parameters
$assocTypeint
$assocIdint

Definition at line 525 of file PKPEmailTemplateDAO.inc.php.

References DAO\update().

PKPEmailTemplateDAO::deleteEmailTemplatesByLocale (   $locale)

Delete all email templates for a specific locale.

Parameters
$localestring

Definition at line 538 of file PKPEmailTemplateDAO.inc.php.

References DAO\update().

PKPEmailTemplateDAO::getBaseEmailTemplate (   $emailKey,
  $assocType,
  $assocId 
)

Retrieve a base email template by key.

Parameters
$emailKeystring
assocTypeint
$assocIdint
Returns
BaseEmailTemplate

Definition at line 33 of file PKPEmailTemplateDAO.inc.php.

References _returnBaseEmailTemplateFromRow(), and DAO\retrieve().

PKPEmailTemplateDAO::getCustomTemplateKeys (   $assocType,
  $assocId 
)

Returns an array of custom template keys

Parameters
int$assocType
int$assocId

Definition at line 634 of file PKPEmailTemplateDAO.inc.php.

References DAO\retrieve().

PKPEmailTemplateDAO::getEmailTemplate (   $emailKey,
  $locale,
  $assocType,
  $assocId 
)

Retrieve an email template by key.

Parameters
$emailKeystring
$localestring
$assocTypeint
$assocIdint
Returns
EmailTemplate

Definition at line 126 of file PKPEmailTemplateDAO.inc.php.

References _returnEmailTemplateFromRow(), AppLocale\getPrimaryLocale(), and DAO\retrieve().

PKPEmailTemplateDAO::getEmailTemplates (   $locale,
  $assocType,
  $assocId,
  $rangeInfo = null 
)

Retrieve all email templates.

Parameters
$localestring
$assocTypeint
$assocIdint
$rangeInfoobject optional
Returns
array Email templates

Definition at line 449 of file PKPEmailTemplateDAO.inc.php.

References _returnEmailTemplateFromRow(), DAO\retrieve(), and DAO\retrieveRange().

PKPEmailTemplateDAO::getInsertId ( )

Get the ID of the last inserted email template.

Returns
int

Definition at line 516 of file PKPEmailTemplateDAO.inc.php.

References DAO\_getInsertId().

Referenced by insertBaseEmailTemplate().

PKPEmailTemplateDAO::getLocaleEmailTemplate (   $emailKey,
  $assocType,
  $assocId 
)

Retrieve localized email template by key.

Parameters
$emailKeystring
$assocTypeint
$assocIdint
Returns
LocaleEmailTemplate

Definition at line 66 of file PKPEmailTemplateDAO.inc.php.

References _returnLocaleEmailTemplateFromRow(), and DAO\retrieve().

PKPEmailTemplateDAO::insertBaseEmailTemplate ( $emailTemplate)

Insert a new base email template.

Parameters
$emailTemplateBaseEmailTemplate

Definition at line 313 of file PKPEmailTemplateDAO.inc.php.

References getInsertId(), and DAO\update().

Referenced by insertLocaleEmailTemplate().

PKPEmailTemplateDAO::insertLocaleEmailTemplate ( $emailTemplate)

Insert a new localized email template.

Parameters
$emailTemplateLocaleEmailTemplate

Definition at line 350 of file PKPEmailTemplateDAO.inc.php.

References insertBaseEmailTemplate(), and updateLocaleEmailTemplateData().

PKPEmailTemplateDAO::installEmailTemplateData (   $templateDataFile,
  $returnSql = false,
  $emailKey = null 
)

Install email template localized data from an XML file. NOTE: Uses qstr instead of ? bindings so that SQL can be fetched rather than executed.

Parameters
$templateDataFilestring Filename to install
$returnSqlboolean Whether or not to return SQL rather than executing it
$emailKeystring If specified, the key of the single template to install (otherwise all are installed)
Returns
array

Definition at line 710 of file PKPEmailTemplateDAO.inc.php.

References DAO\getDataSource(), and DAO\update().

PKPEmailTemplateDAO::installEmailTemplates (   $templatesFile,
  $returnSql = false,
  $emailKey = null,
  $skipExisting = false 
)

Install email templates from an XML file. NOTE: Uses qstr instead of ? bindings so that SQL can be fetched rather than executed.

Parameters
$templatesFilestring Filename to install
$returnSqlboolean Whether or not to return SQL rather than executing it
$emailKeystring Optional name of single email key to install, skipping others
$skipExistingboolean If true, do not install email templates that already exist in the database
$emailKeystring If specified, the key of the single template to install (otherwise all are installed)
Returns
array

Definition at line 671 of file PKPEmailTemplateDAO.inc.php.

References DAO\getDataSource(), templateExistsByKey(), and DAO\update().

PKPEmailTemplateDAO::PKPEmailTemplateDAO ( )

Constructor

Definition at line 22 of file PKPEmailTemplateDAO.inc.php.

PKPEmailTemplateDAO::templateExistsByKey (   $emailKey,
  $assocType = null,
  $assocId = null 
)

Check if a template exists with the given email key for a journal/ conference/...

Parameters
$emailKeystring
$assocTypeint optional
$assocIdint optional
Returns
boolean

Definition at line 562 of file PKPEmailTemplateDAO.inc.php.

References DAO\retrieve().

Referenced by installEmailTemplates().

PKPEmailTemplateDAO::updateBaseEmailTemplate ( $emailTemplate)

Update an existing base email template.

Parameters
$emailTemplateBaseEmailTemplate

Definition at line 334 of file PKPEmailTemplateDAO.inc.php.

References DAO\update().

Referenced by updateLocaleEmailTemplate().

PKPEmailTemplateDAO::updateLocaleEmailTemplate ( $emailTemplate)

Update an existing localized email template.

Parameters
$emailTemplateLocaleEmailTemplate

Definition at line 359 of file PKPEmailTemplateDAO.inc.php.

References updateBaseEmailTemplate(), and updateLocaleEmailTemplateData().

PKPEmailTemplateDAO::updateLocaleEmailTemplateData ( $emailTemplate)

Insert/update locale-specific email template data.

Parameters
$emailTemplateLocaleEmailTemplate

Definition at line 368 of file PKPEmailTemplateDAO.inc.php.

References DAO\retrieve(), and DAO\update().

Referenced by insertLocaleEmailTemplate(), and updateLocaleEmailTemplate().


The documentation for this class was generated from the following file: