Open Monograph Press  3.3.0
APP\Services\PublicationService Class Reference
Inheritance diagram for APP\Services\PublicationService:
PKP\Services\PKPPublicationService

Public Member Functions

 __construct ()
 
 addPublication ($hookName, $args)
 
 deletePublicationBefore ($hookName, $args)
 
 editPublication ($hookName, $args)
 
 getPublicationProperties ($hookName, $args)
 
 getThumbnailFileName ($fileName)
 
 makeThumbnail ($filePath, $thumbFileName, $maxWidth, $maxHeight)
 
 publishPublication ($hookName, $args)
 
 publishPublicationBefore ($hookName, $args)
 
 unpublishPublication ($hookName, $args)
 
 validatePublication ($hookName, $args)
 
 versionPublication ($hookName, $args)
 
- Public Member Functions inherited from PKP\Services\PKPPublicationService
 add ($publication, $request)
 
 delete ($publication)
 
 edit ($publication, $params, $request)
 
 get ($publicationId)
 
 getCount ($args=[])
 
 getDateBoundaries ($args)
 
 getFullProperties ($publication, $args=null)
 
 getIds ($args=[])
 
 getMany ($args=[])
 
 getMax ($args=[])
 
 getProperties ($publication, $props, $args=null)
 
 getQueryBuilder ($args=[])
 
 getSummaryProperties ($publication, $args=null)
 
 publish ($publication)
 
 unpublish ($publication)
 
 validate ($action, $props, $allowedLocales, $primaryLocale)
 
 validatePublish ($publication, $submission, $allowedLocales, $primaryLocale)
 
 version ($publication, $request)
 

Additional Inherited Members

- Protected Member Functions inherited from PKP\Services\PKPPublicationService
 _saveFileParam ($publication, $submission, $value, $settingName, $userId, $localeKey='', $isImage=false)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

APP\Services\PublicationService::__construct ( )

Initialize hooks for extending PKPPublicationService

Definition at line 27 of file PublicationService.inc.php.

References HookRegistry\register().

Member Function Documentation

◆ addPublication()

APP\Services\PublicationService::addPublication (   $hookName,
  $args 
)

Perform OMP-specific steps when adding a publication

Parameters
string$hookName
array$args[ @option Publication @option Request ]

Definition at line 140 of file PublicationService.inc.php.

References PKPServices\get(), APP\Services\PublicationService\getThumbnailFileName(), and APP\Services\PublicationService\makeThumbnail().

◆ deletePublicationBefore()

APP\Services\PublicationService::deletePublicationBefore (   $hookName,
  $args 
)

Delete OJS-specific objects before a publication is deleted

Parameters
$hookNamestring
$argsarray [ @option Publication The publication being deleted ]

Definition at line 443 of file PublicationService.inc.php.

References PKPServices\get(), and DAORegistry\getDAO().

◆ editPublication()

APP\Services\PublicationService::editPublication (   $hookName,
  $args 
)

Perform OMP-specific steps when editing a publication

Parameters
string$hookName
array$args[ @option Publication The new publication details @option Publication The old publication details @option array The params with the edited values @option Request ]

Definition at line 184 of file PublicationService.inc.php.

References PKPServices\get(), PKPApplication\get(), APP\Services\PublicationService\getThumbnailFileName(), and APP\Services\PublicationService\makeThumbnail().

◆ getPublicationProperties()

APP\Services\PublicationService::getPublicationProperties (   $hookName,
  $args 
)

Add values when retrieving an object's properties

Parameters
$hookNamestring
$argsarray [ @option array Property values @option Publication @option array The props requested @option array Additional arguments (such as the request object) passed ]

Definition at line 50 of file PublicationService.inc.php.

References PKPServices\get(), and DAORegistry\getDAO().

◆ getThumbnailFileName()

APP\Services\PublicationService::getThumbnailFileName (   $fileName)

Derive a thumbnail filename from the cover image filename

book_1_1_cover.png --> book_1_1_cover_t.png

Parameters
string$fileName
Returns
string The thumbnail filename

Definition at line 470 of file PublicationService.inc.php.

Referenced by APP\Services\PublicationService\addPublication(), and APP\Services\PublicationService\editPublication().

◆ makeThumbnail()

APP\Services\PublicationService::makeThumbnail (   $filePath,
  $thumbFileName,
  $maxWidth,
  $maxHeight 
)

Generate a thumbnail of an image

Parameters
string$filePathThe full path and name of the file
int$maxWidthThe maximum allowed width of the thumbnail
int$maxHeightThe maximum allowed height of the thumbnail

Definition at line 482 of file PublicationService.inc.php.

Referenced by APP\Services\PublicationService\addPublication(), and APP\Services\PublicationService\editPublication().

◆ publishPublication()

APP\Services\PublicationService::publishPublication (   $hookName,
  $args 
)

Fire events after a publication has been published

Parameters
$hookNamestring
$argsarray [ @option Publication The new version of the publication @option Publication The old version of the publication @option Submission The publication's submission ]

Definition at line 375 of file PublicationService.inc.php.

References PKPApplication\get(), and DAORegistry\getDAO().

◆ publishPublicationBefore()

APP\Services\PublicationService::publishPublicationBefore (   $hookName,
  $args 
)

Modify a publication before it is published

Parameters
$hookNamestring
$argsarray [ @option Publication The new version of the publication @option Publication The old version of the publication ]

Definition at line 354 of file PublicationService.inc.php.

References Core\getCurrentDate().

◆ unpublishPublication()

APP\Services\PublicationService::unpublishPublication (   $hookName,
  $args 
)

Fire events after a publication has been unpublished

Parameters
$hookNamestring
$argsarray [ @option Publication The new version of the publication @option Publication The old version of the publication @option Submission The publication's submission ]

Definition at line 409 of file PublicationService.inc.php.

References PKPServices\get(), PKPApplication\get(), and DAORegistry\getDAO().

◆ validatePublication()

APP\Services\PublicationService::validatePublication (   $hookName,
  $args 
)

Make additional validation checks

Parameters
$hookNamestring
$argsarray [ @option array Validation errors already identified @option string One of the VALIDATE_ACTION_* constants @option array The props being validated @option array The locales accepted for this object @option string The primary locale for this object ]

Definition at line 118 of file PublicationService.inc.php.

References PKPApplication\get().

◆ versionPublication()

APP\Services\PublicationService::versionPublication (   $hookName,
  $args 
)

Copy OMP-specific objects when a new publication version is created

Parameters
$hookNamestring
$argsarray [ @option Publication The new version of the publication @option Publication The old version of the publication @option Request ]

Definition at line 244 of file PublicationService.inc.php.

References PKPServices\get(), DAORegistry\getDAO(), and Application\getRepresentationDAO().


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