Open Journal Systems  3.3.0
PKP\Services\PKPEmailTemplateService Class Reference
Inheritance diagram for PKP\Services\PKPEmailTemplateService:

Public Member Functions

 add ($emailTemplate, $request)
 
 delete ($emailTemplate)
 
 edit ($emailTemplate, $params, $request)
 
 get ($emailTemplateId)
 
 getByKey ($contextId, $key)
 
 getCount ($args=[])
 
 getFullProperties ($emailTemplate, $args=null)
 
 getIds ($args=[])
 
 getMany ($args=[])
 
 getMax ($args=[])
 
 getProperties ($emailTemplate, $props, $args=null)
 
 getQueryBuilder ($args=[])
 
 getSummaryProperties ($emailTemplate, $args=null)
 
 restoreDefaults ($contextId)
 
 validate ($action, $props, $allowedLocales, $primaryLocale)
 

Detailed Description

Definition at line 32 of file PKPEmailTemplateService.inc.php.

Member Function Documentation

◆ add()

PKP\Services\PKPEmailTemplateService::add (   $emailTemplate,
  $request 
)

◆ delete()

PKP\Services\PKPEmailTemplateService::delete (   $emailTemplate)

Definition at line 320 of file PKPEmailTemplateService.inc.php.

References HookRegistry\call(), and DAORegistry\getDAO().

◆ edit()

PKP\Services\PKPEmailTemplateService::edit (   $emailTemplate,
  $params,
  $request 
)

◆ get()

PKP\Services\PKPEmailTemplateService::get (   $emailTemplateId)

Do not use. An email template should be retrieved by its key.

See also
PKPEmailTemplateService::getByKey()

Definition at line 39 of file PKPEmailTemplateService.inc.php.

◆ getByKey()

PKP\Services\PKPEmailTemplateService::getByKey (   $contextId,
  $key 
)

Get an email template by key

Returns a custom email template if one exists for the requested context or the default template if no custom template exists.

Returns null if no template is found for the requested key

Parameters
integer$contextId
string$key
Returns
EmailTemplate

Definition at line 55 of file PKPEmailTemplateService.inc.php.

References DAORegistry\getDAO().

Referenced by PKP\Services\PKPEmailTemplateService\add(), PKP\Services\PKPEmailTemplateService\edit(), and PKP\Services\PKPEmailTemplateService\validate().

◆ getCount()

PKP\Services\PKPEmailTemplateService::getCount (   $args = [])

◆ getFullProperties()

PKP\Services\PKPEmailTemplateService::getFullProperties (   $emailTemplate,
  $args = null 
)

◆ getIds()

PKP\Services\PKPEmailTemplateService::getIds (   $args = [])

Definition at line 80 of file PKPEmailTemplateService.inc.php.

◆ getMany()

PKP\Services\PKPEmailTemplateService::getMany (   $args = [])

Get email templates

Parameters
array$args{ @option bool isEnabled @option int|array fromRoleIds @option int|array toRoleIds @option string searchPhrase @option int|array stageIds }
Returns
Iterator

Definition at line 96 of file PKPEmailTemplateService.inc.php.

References DAORegistry\getDAO(), and PKP\Services\PKPEmailTemplateService\getQueryBuilder().

◆ getMax()

PKP\Services\PKPEmailTemplateService::getMax (   $args = [])

◆ getProperties()

PKP\Services\PKPEmailTemplateService::getProperties (   $emailTemplate,
  $props,
  $args = null 
)

◆ getQueryBuilder()

PKP\Services\PKPEmailTemplateService::getQueryBuilder (   $args = [])

◆ getSummaryProperties()

PKP\Services\PKPEmailTemplateService::getSummaryProperties (   $emailTemplate,
  $args = null 
)

◆ restoreDefaults()

PKP\Services\PKPEmailTemplateService::restoreDefaults (   $contextId)

Remove all custom templates and template modifications. Resets the email template settings to their installed defaults.

Returns
array List of keys that were deleted or reset

Definition at line 333 of file PKPEmailTemplateService.inc.php.

References HookRegistry\call(), and DAORegistry\getDAO().

◆ validate()


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