Open Monograph Press  3.3.0
Chapter Class Reference
Inheritance diagram for Chapter:
DataObject

Public Member Functions

 __construct ()
 
 getAbstract ($locale=null)
 
 getAuthorNamesAsString ($preferred=true)
 
 getAuthors ()
 
 getDAO ()
 
 getDatePublished ()
 
 getLocalizedAbstract ()
 
 getLocalizedData ($key, $preferredLocale=null)
 
 getLocalizedFullTitle ()
 
 getLocalizedSubtitle ()
 
 getLocalizedTitle ()
 
 getPages ()
 
 getSequence ()
 
 getStoredPubId ($pubIdType)
 
 getSubtitle ($locale=null)
 
 getTitle ($locale=null)
 
 setAbstract ($abstract, $locale=null)
 
 setDatePublished ($datePublished)
 
 setPages ($pages)
 
 setSequence ($sequence)
 
 setStoredPubId ($pubIdType, $pubId)
 
 setSubtitle ($subtitle, $locale=null)
 
 setTitle ($title, $locale=null)
 
- Public Member Functions inherited from DataObject
 addSupportedMetadataAdapter ($metadataAdapter)
 
 extractMetadata ($metadataSchema)
 
 getAdditionalMetadataFieldNames ()
 
getAllData ()
 
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

Describes a monograph chapter (or section)

See also
ChapterDAO

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

Constructor & Destructor Documentation

◆ __construct()

Chapter::__construct ( )

Constructor

Reimplemented from DataObject.

Definition at line 21 of file Chapter.inc.php.

Member Function Documentation

◆ getAbstract()

Chapter::getAbstract (   $locale = null)

Get abstract of chapter (primary locale)

Parameters
$localestring
Returns
string

Definition at line 202 of file Chapter.inc.php.

References DataObject\getData().

◆ getAuthorNamesAsString()

Chapter::getAuthorNamesAsString (   $preferred = true)

Get the author names for this chapter and return them as a string.

Parameters
$preferredboolean If the preferred public name should be used, if exist
Returns
string

Definition at line 159 of file Chapter.inc.php.

References getAuthors().

◆ getAuthors()

Chapter::getAuthors ( )

Get all authors of this chapter.

Returns
DAOResultFactory Iterator of authors

Definition at line 149 of file Chapter.inc.php.

References DAORegistry\getDAO(), DataObject\getData(), and DataObject\getId().

Referenced by getAuthorNamesAsString().

◆ getDAO()

Chapter::getDAO ( )

Get DAO class name for this object.

Returns
DAO

Reimplemented from DataObject.

Definition at line 193 of file Chapter.inc.php.

References DAORegistry\getDAO().

◆ getDatePublished()

Chapter::getDatePublished ( )

get date published

Returns
date

Definition at line 225 of file Chapter.inc.php.

References DataObject\getData().

◆ getLocalizedAbstract()

Chapter::getLocalizedAbstract ( )

Get localized abstract of a chapter.

Definition at line 217 of file Chapter.inc.php.

References getLocalizedData().

◆ getLocalizedData()

Chapter::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 first locale we find data for

    Todo:
    Chapters should have access to their publication's locale and should fall back to that after the user's current locale and before the last fall back to the first data available.
    Parameters
    string$key
    string$preferredLocale
    Returns
    mixed

Reimplemented from DataObject.

Definition at line 44 of file Chapter.inc.php.

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

Referenced by getLocalizedAbstract(), getLocalizedSubtitle(), and getLocalizedTitle().

◆ getLocalizedFullTitle()

Chapter::getLocalizedFullTitle ( )

Get the chapter full title (with title and subtitle).

Returns
string

Definition at line 68 of file Chapter.inc.php.

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

◆ getLocalizedSubtitle()

Chapter::getLocalizedSubtitle ( )

Get localized sub title of a chapter.

Definition at line 107 of file Chapter.inc.php.

References getLocalizedData().

Referenced by getLocalizedFullTitle().

◆ getLocalizedTitle()

Chapter::getLocalizedTitle ( )

Get localized title of a chapter.

Definition at line 82 of file Chapter.inc.php.

References getLocalizedData().

Referenced by getLocalizedFullTitle().

◆ getPages()

Chapter::getPages ( )

get pages

Returns
string

Definition at line 241 of file Chapter.inc.php.

References DataObject\getData().

◆ getSequence()

Chapter::getSequence ( )

Get sequence of chapter.

Returns
float

Definition at line 133 of file Chapter.inc.php.

References DataObject\getData().

◆ getStoredPubId()

Chapter::getStoredPubId (   $pubIdType)

Get stored public ID of the chapter.

Parameters

Definition at line 175 of file Chapter.inc.php.

References DataObject\getData().

◆ getSubtitle()

Chapter::getSubtitle (   $locale = null)

Get sub title of chapter (primary locale)

Parameters
$localestring
Returns
string

Definition at line 116 of file Chapter.inc.php.

References DataObject\getData().

◆ getTitle()

Chapter::getTitle (   $locale = null)

Get title of chapter (primary locale)

Parameters
$localestring
Returns
string

Definition at line 91 of file Chapter.inc.php.

References DataObject\getData().

◆ setAbstract()

Chapter::setAbstract (   $abstract,
  $locale = null 
)

Set abstract of chapter

Parameters
$abstractstring
$localestring

Definition at line 211 of file Chapter.inc.php.

References DataObject\setData().

◆ setDatePublished()

Chapter::setDatePublished (   $datePublished)

set date published

Parameters
$datePublisheddate

Definition at line 233 of file Chapter.inc.php.

References DataObject\setData().

◆ setPages()

Chapter::setPages (   $pages)

set pages

Parameters
$pagesstring

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

References DataObject\setData().

◆ setSequence()

Chapter::setSequence (   $sequence)

Set sequence of chapter.

Parameters
$sequencefloat

Definition at line 141 of file Chapter.inc.php.

References DataObject\setData().

◆ setStoredPubId()

Chapter::setStoredPubId (   $pubIdType,
  $pubId 
)

Set the stored public ID of the chapter.

Parameters
$pubIdTypestring One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html).
$pubIdstring

Definition at line 186 of file Chapter.inc.php.

References DataObject\setData().

◆ setSubtitle()

Chapter::setSubtitle (   $subtitle,
  $locale = null 
)

Set sub title of chapter

Parameters
$subtitlestring
$localestring

Definition at line 125 of file Chapter.inc.php.

References DataObject\setData().

◆ setTitle()

Chapter::setTitle (   $title,
  $locale = null 
)

Set title of chapter

Parameters
$titlestring
$localestring

Definition at line 100 of file Chapter.inc.php.

References DataObject\setData().


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