Open Journal Systems  2.4.4
 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)
 
getEmailTemplate ($emailKey, $locale, $assocType, $assocId)
 
getEmailTemplates ($locale, $assocType, $assocId, $rangeInfo=null)
 
 getInsertEmailId ()
 
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 ()
 
 getDataChangedEvent ($elementId=null, $parentElementId=null)
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getInsertId ($table= '', $id= '', $callHooks=true)
 
 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

- Public Attributes inherited from DAO
 $_dataSource
 

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 202 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 296 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 223 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 627 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 563 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 442 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 540 of file PKPEmailTemplateDAO.inc.php.

References DAO\update().

PKPEmailTemplateDAO::deleteEmailTemplatesByLocale (   $locale)

Delete all email templates for a specific locale.

Parameters
$localestring

Definition at line 553 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::getEmailTemplate (   $emailKey,
  $locale,
  $assocType,
  $assocId 
)

Retrieve an email template by key.

Parameters
$emailKeystring
$localestring
$assocTypeint
$assocIdint
Returns
EmailTemplate

Definition at line 131 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 461 of file PKPEmailTemplateDAO.inc.php.

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

PKPEmailTemplateDAO::getInsertEmailId ( )

Get the ID of the last inserted email template.

Returns
int

Definition at line 531 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 68 of file PKPEmailTemplateDAO.inc.php.

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

PKPEmailTemplateDAO::insertBaseEmailTemplate ( $emailTemplate)

Insert a new base email template.

Parameters
$emailTemplateBaseEmailTemplate

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

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

Referenced by insertLocaleEmailTemplate().

PKPEmailTemplateDAO::insertLocaleEmailTemplate ( $emailTemplate)

Insert a new localized email template.

Parameters
$emailTemplateLocaleEmailTemplate

Definition at line 360 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 714 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 675 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 577 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 344 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 369 of file PKPEmailTemplateDAO.inc.php.

References updateBaseEmailTemplate(), and updateLocaleEmailTemplateData().

PKPEmailTemplateDAO::updateLocaleEmailTemplateData ( $emailTemplate)

Insert/update locale-specific email template data.

Parameters
$emailTemplateLocaleEmailTemplate

Definition at line 378 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: