O3PO_Ready2PublishStorage
in package
Trait for the storage of data on manuscripts ready to publish.
Tags
Table of Contents
Properties
- $manuscript_info_fields_to_store : array<string|int, mixed>
- Manuscript fields to store
- $plugin_name : string
- Name of the plugin under which this storage operates
- $slug : string
- Slug of the storage
Methods
- __construct() : mixed
- Construct the storage
- get_all_manuscripts() : mixed
- Get all manuscripts
- get_manuscript() : mixed
- Get a manuscript by ID
- get_manuscripts() : array<string|int, mixed>
- Get manuscripts by post status
- post_id_for_eprint() : int|null
- Find the id of the post belonging to this eprint
- store_manuscript() : mixed
- Store a manuscript
Properties
$manuscript_info_fields_to_store
Manuscript fields to store
private
static array<string|int, mixed>
$manuscript_info_fields_to_store
= array(
'eprint',
'agree_to_publish',
'acceptance_code',
'title',
'corresponding_author_email',
'abstract',
'author_given_names',
// is populated from author_last_names
'author_surnames',
// is populated from author_last_names
'author_name_styles',
'number_award_numbers',
'award_numbers',
'funder_names',
'funder_identifiers',
'popular_summary',
'feature_image_attachment_id',
// due to compatibility with the publication type class we call these fields feature_image_... and not featured_image_... as in the form
'feature_image_caption',
'dissemination_multimedia',
'fermats_library',
'copyright_confirmation',
'payment_method',
'payment_amount',
'invoice_recipient',
'invoice_address',
'invoice_vat_number',
'ready2publish_comments',
'time_submitted',
)
array of fields to store. All other fields are ignored.
Array of fields to store.
Tags
$plugin_name
Name of the plugin under which this storage operates
private
string
$plugin_name
PLugin name.
Tags
$slug
Slug of the storage
private
string
$slug
Slug.
Tags
Methods
__construct()
Construct the storage
public
__construct(string $plugin_name, string $slug) : mixed
Parameters
- $plugin_name : string
-
The name of the plugin under which this storage runs.
- $slug : string
-
Slug of this storage.
Tags
get_all_manuscripts()
Get all manuscripts
public
get_all_manuscripts() : mixed
Tags
get_manuscript()
Get a manuscript by ID
public
get_manuscript(int $id) : mixed
Parameters
- $id : int
-
ID of the manuscript to get.
Tags
get_manuscripts()
Get manuscripts by post status
public
get_manuscripts(string $post_status) : array<string|int, mixed>
Parameters
- $post_status : string
-
One of 'unprocessed', 'published', or 'partial'
Tags
Return values
array<string|int, mixed> —Array mapping manuscript ids to manuscript information and the post_id if any
post_id_for_eprint()
Find the id of the post belonging to this eprint
public
static post_id_for_eprint(string $eprint_without_version) : int|null
Parameters
- $eprint_without_version : string
-
The eprint without version.
Tags
Return values
int|null —The post id or null in case no post is found for the eprint
store_manuscript()
Store a manuscript
public
store_manuscript(array<string|int, mixed> $manuscript_info) : mixed
Parameters
- $manuscript_info : array<string|int, mixed>
-
Information about the manuscript to store.