Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkp/pkp-lib#1934 move cover image handling into applications #346

Merged
merged 2 commits into from
Nov 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions classes/monograph/Monograph.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,38 @@ function _getContextLicenseFieldValue($locale, $field) {
if (isset($fieldValue[$locale])) return $fieldValue[$locale];
return null;
}

/**
* get cover page server-side file name
* @return string
*/
function getCoverImage() {
return $this->getData('coverImage');
}

/**
* set cover page server-side file name
* @param $coverImage string
*/
function setCoverImage($coverImage) {
$this->setData('coverImage', $coverImage);
}

/**
* get cover page alternate text
* @return string
*/
function getCoverImageAltText() {
return $this->getData('coverImageAltText');
}

/**
* set cover page alternate text
* @param $coverImageAltText string
*/
function setCoverImageAltText($coverImageAltText) {
$this->setData('coverImageAltText', $coverImageAltText);
}
}

?>
12 changes: 12 additions & 0 deletions classes/monograph/MonographDAO.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ function getLocaleFieldNames() {
));
}

/**
* Get a list of additional fields that do not have
* dedicated accessors.
* @return array
*/
function getAdditionalFieldNames() {
return array_merge(
parent::getAdditionalFieldNames(), array(
'coverImage', 'coverImageAltText',
));
}

/**
* Internal function to return an Monograph object from a row.
* @param $row array
Expand Down
2 changes: 1 addition & 1 deletion lib/pkp