Open Journal Systems
3.3.0
|
Public Member Functions | |
_fromRow ($primaryRow) | |
defaultTemplateIsInstalled ($key) | |
deleteDefaultEmailTemplatesByLocale ($locale) | |
deleteEmailTemplatesByLocale ($locale) | |
getMainEmailTemplatesFilename () | |
insertObject ($object) | |
installEmailTemplateData ($templateDataFile, $locale, $returnSql=false, $emailKey=null) | |
installEmailTemplateLocaleData ($templatesFile, $locales=array(), $returnSql=false, $emailKey=null) | |
installEmailTemplates ($templatesFile, $locales=array(), $returnSql=false, $emailKey=null, $skipExisting=false) | |
newDataObject () | |
updateObject ($object) | |
Public Member Functions inherited from SchemaDAO | |
deleteById ($objectId) | |
deleteObject ($object) | |
getById ($objectId) | |
getInsertId () | |
Public Member Functions inherited from DAO | |
__construct ($dataSource=null, $callHooks=true) | |
concat () | |
convertFromDB ($value, $type) | |
convertToDB ($value, &$type) | |
dateFromDB ($d) | |
datetimeFromDB ($dt) | |
datetimeToDB ($dt) | |
dateToDB ($d) | |
flushCache () | |
formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true) | |
getAdditionalFieldNames () | |
getAffectedRows () | |
getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject) | |
getDataSource () | |
getDirectionMapping ($direction) | |
getDriver () | |
getLocaleFieldNames () | |
getType ($value) | |
handleError ($dataSource, $sql) | |
nullOrInt ($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) | |
Data Fields | |
$primaryKeyColumn = 'email_id' | |
$primaryTableColumns | |
$schemaName = SCHEMA_EMAIL_TEMPLATE | |
$settingsTableName = 'email_templates_settings' | |
$tableName = 'email_templates' | |
Data Fields inherited from SchemaDAO | |
$primaryKeyColumn | |
$primaryTableColumns = array() | |
$schemaName | |
$settingsTableName | |
$tableName | |
Data Fields inherited from DAO | |
$_dataSource | |
Additional Inherited Members | |
Static Public Member Functions inherited from DAO | |
static | getDataChangedEvent ($elementId=null, $parentElementId=null, $content='') |
Protected Member Functions inherited from DAO | |
_getInsertId ($table='', $id='') | |
Operations for retrieving and modifying Email Template objects.
Definition at line 21 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::_fromRow | ( | $primaryRow | ) |
Extend SchemaDAO::_fromRow() to add data from the email template defaults
$primaryRow | array The result row from the primary table lookup |
Reimplemented from SchemaDAO.
Definition at line 99 of file EmailTemplateDAO.inc.php.
References DAO\convertFromDB(), PKPServices\get(), and DAO\retrieve().
EmailTemplateDAO::defaultTemplateIsInstalled | ( | $key | ) |
Check if a template exists with the given email key for a journal/ conference/...
$key | string |
$contextId | int optional |
Definition at line 158 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::deleteDefaultEmailTemplatesByLocale | ( | $locale | ) |
Delete all default email templates for a specific locale.
$locale | string |
Definition at line 145 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::deleteEmailTemplatesByLocale | ( | $locale | ) |
Delete all email templates for a specific locale.
$locale | string |
Definition at line 135 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::getMainEmailTemplatesFilename | ( | ) |
Get the main email template path and filename.
Definition at line 174 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::insertObject | ( | $object | ) |
Insert a new object
DataObject | $object | The object to insert into the database |
Reimplemented from SchemaDAO.
Definition at line 60 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::installEmailTemplateData | ( | $templateDataFile, | |
$locale, | |||
$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.
$templateDataFile | string Filename to install |
$locale | string Locale of template(s) to install |
$returnSql | boolean Whether or not to return SQL rather than executing it |
$emailKey | string If specified, the key of the single template to install (otherwise all are installed) |
Definition at line 299 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::installEmailTemplateLocaleData | ( | $templatesFile, | |
$locales = array() , |
|||
$returnSql = false , |
|||
$emailKey = null |
|||
) |
Install email template contents from an XML file. NOTE: Uses qstr instead of ? bindings so that SQL can be fetched rather than executed.
$templatesFile | string Filename to install |
$locales | List of locales to install data for |
$returnSql | boolean Whether or not to return SQL rather than executing it |
$emailKey | string Optional name of single email key to install, skipping others |
Definition at line 241 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::installEmailTemplates | ( | $templatesFile, | |
$locales = array() , |
|||
$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.
$templatesFile | string Filename to install |
$locales | List of locales to install data for |
$returnSql | boolean Whether or not to return SQL rather than executing it |
$emailKey | string Optional name of single email key to install, skipping others |
$skipExisting | boolean If true, do not install email templates that already exist in the database |
Definition at line 192 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::newDataObject | ( | ) |
Create a new DataObject of the appropriate class
Reimplemented from SchemaDAO.
Definition at line 53 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::updateObject | ( | $object | ) |
Update an object
When updating an object, we remove table rows for any settings which are no longer present.
Multilingual fields are an exception to this. When a locale key is missing from the object, it is not removed from the database. This is to ensure that data from a locale which is later disabled is not automatically removed from the database, and will appear if the locale is re-enabled.
To delete a value for a locale key, a null value must be passed.
$object | DataObject The object to insert into the database |
Reimplemented from SchemaDAO.
Definition at line 78 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::$primaryKeyColumn = 'email_id' |
The column name for the object id in primary and settings tables
Definition at line 32 of file EmailTemplateDAO.inc.php.
array EmailTemplateDAO::$primaryTableColumns |
Maps schema properties for the primary table to their column names
Definition at line 38 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::$schemaName = SCHEMA_EMAIL_TEMPLATE |
One of the SCHEMA_... constants
Definition at line 23 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::$settingsTableName = 'email_templates_settings' |
The name of the settings table for this object
Definition at line 29 of file EmailTemplateDAO.inc.php.
EmailTemplateDAO::$tableName = 'email_templates' |
The name of the primary table for this object
Definition at line 26 of file EmailTemplateDAO.inc.php.