Open Journal Systems  3.3.0
PKPPublication Class Reference
Inheritance diagram for PKPPublication:
DataObject Publication

Public Member Functions

 getAuthorString ($userGroups)
 
 getEndingPage ()
 
 getFullTitles ()
 
 getLocalizedData ($key, $preferredLocale=null)
 
 getLocalizedFullTitle ($preferredLocale=null)
 
 getLocalizedTitle ($preferredLocale=null)
 
 getPageArray ()
 
 getPrimaryAuthor ()
 
 getShortAuthorString ()
 
 getStartingPage ()
 
 getStoredPubId ($pubIdType)
 
 getTitles ()
 
 isCCLicense ()
 
 stampModified ()
 
- Public Member Functions inherited from DataObject
 __construct ()
 
 addSupportedMetadataAdapter ($metadataAdapter)
 
 extractMetadata ($metadataSchema)
 
 getAdditionalMetadataFieldNames ()
 
getAllData ()
 
 getDAO ()
 
getData ($key, $locale=null)
 
 getHasLoadableAdapters ()
 
 getId ()
 
 getLocaleMetadataFieldNames ()
 
 getMetadataFieldNames ($translated=true)
 
 getSetMetadataFieldNames ($translated=true)
 
 getSupportedExtractionAdapters ()
 
 getSupportedInjectionAdapters ()
 
 getSupportedMetadataSchemas ()
 
 hasData ($key, $locale=null)
 
 injectMetadata ($metadataDescription)
 
 removeSupportedMetadataAdapter ($metadataSchemaName)
 
 setAllData (&$data)
 
 setData ($key, $value, $locale=null)
 
 setHasLoadableAdapters ($hasLoadableAdapters)
 
 setId ($id)
 
 unsetData ($key, $locale=null)
 
 upcastTo ($targetObject)
 

Additional Inherited Members

- Data Fields inherited from DataObject
 $_data = array()
 
 $_extractionAdaptersLoaded = false
 
 $_hasLoadableAdapters = false
 
 $_injectionAdaptersLoaded = false
 
 $_metadataExtractionAdapters = array()
 
 $_metadataInjectionAdapters = array()
 

Detailed Description

Base class for Publication.

See also
PublicationDAO

Definition at line 17 of file PKPPublication.inc.php.

Member Function Documentation

◆ getAuthorString()

PKPPublication::getAuthorString (   $userGroups)

Combine author names and roles into a string

Eg - Daniel Barnes, Carlo Corino (Author); Alan Mwandenga (Translator)

Parameters
array$userGroupsList of UserGroup objects
Returns
string

Definition at line 130 of file PKPPublication.inc.php.

References DataObject\getData().

◆ getEndingPage()

PKPPublication::getEndingPage ( )

Get ending page of a this publication

Note the return type of string - this is not to be used for page counting.

Returns
string

Definition at line 249 of file PKPPublication.inc.php.

References getPageArray().

◆ getFullTitles()

PKPPublication::getFullTitles ( )

Return the combined prefix, title and subtitle for all locales

Returns
array

Definition at line 77 of file PKPPublication.inc.php.

References DataObject\getData(), and getLocalizedFullTitle().

◆ getLocalizedData()

PKPPublication::getLocalizedData (   $key,
  $preferredLocale = null 
)

Get localized data for this object.

It selects the locale in the following order:

  • $preferredLocale
  • the user's current locale
  • the publication's primary locale
  • the first locale we find data for
Parameters
string$key
string$preferredLocale
Returns
mixed

Reimplemented from DataObject.

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

References DataObject\getData(), and AppLocale\getLocale().

Referenced by Publication\getLocalizedCoverImageUrl(), getLocalizedFullTitle(), and getLocalizedTitle().

◆ getLocalizedFullTitle()

PKPPublication::getLocalizedFullTitle (   $preferredLocale = null)

Combine the localized title, prefix and subtitle

Parameters
string$preferredLocaleOverride the publication's default locale and return the title in a specified locale.
Returns
string

Definition at line 63 of file PKPPublication.inc.php.

References PKPString\concatTitleFields(), getLocalizedData(), and getLocalizedTitle().

Referenced by getFullTitles().

◆ getLocalizedTitle()

PKPPublication::getLocalizedTitle (   $preferredLocale = null)

Combine the localized title and prefix

Parameters
string$preferredLocaleOverride the publication's default locale and return the title in a specified locale.
Returns
string

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

References getLocalizedData().

Referenced by getLocalizedFullTitle(), and getTitles().

◆ getPageArray()

PKPPublication::getPageArray ( )

Get pages converted to a nested array of page ranges

For example, pages of "pp. ii-ix, 9,15-18,a2,b2-b6" will return:

[ ['ii', 'ix'], ['9'], ['15', '18'], ['a2'], ['b2', 'b6'], ]

Returns
array

Definition at line 271 of file PKPPublication.inc.php.

References DataObject\getData().

Referenced by getEndingPage(), and getStartingPage().

◆ getPrimaryAuthor()

PKPPublication::getPrimaryAuthor ( )

Get the primary contact

Returns
Author|null

Definition at line 206 of file PKPPublication.inc.php.

References DataObject\getData().

◆ getShortAuthorString()

PKPPublication::getShortAuthorString ( )

Combine the author names into a shortened string

Eg - Barnes, et al.

Returns
string

Definition at line 181 of file PKPPublication.inc.php.

References DataObject\getData(), and AppLocale\requireComponents().

◆ getStartingPage()

PKPPublication::getStartingPage ( )

Get the starting page of this publication

Note the return type of string - this is not to be used for page counting.

Returns
string

Definition at line 232 of file PKPPublication.inc.php.

References getPageArray().

◆ getStoredPubId()

PKPPublication::getStoredPubId (   $pubIdType)

Get stored public ID of the publication

This helper function is required by PKPPubIdPlugins.

See also
Submission::getStoredPubId()

Definition at line 312 of file PKPPublication.inc.php.

References DataObject\getData().

◆ getTitles()

PKPPublication::getTitles ( )

Return the combined title and prefix for all locales

Returns
array

Definition at line 110 of file PKPPublication.inc.php.

References DataObject\getData(), and getLocalizedTitle().

◆ isCCLicense()

PKPPublication::isCCLicense ( )

Is the license for copyright on this publication a Creative Commons license?

Returns
boolean

Definition at line 302 of file PKPPublication.inc.php.

References DataObject\getData().

◆ stampModified()

PKPPublication::stampModified ( )

Stamp the date of the last modification to the current time.

Definition at line 220 of file PKPPublication.inc.php.

References Core\getCurrentDate(), and DataObject\setData().


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